1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-22 20:40:41 +08:00
NeoNetwork/.github/workflows/test-your-pr.yml
Jerry aabb859780
test-your-pr: add bot comment [skip ci]
Signed-off-by: Jerry <isjerryxiao@outlook.com>
2023-12-05 18:17:22 +08:00

59 lines
1.5 KiB
YAML

name: Test Your PR
on:
pull_request:
branches: [master]
jobs:
build:
name: Generate ROA
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/checkout@v2
with:
repository: NeoCloud/NeoNetwork-ROA
path: generated
- uses: actions/setup-python@v2
with:
python-version: 3.x
architecture: x64
- run: env PYTHONUNBUFFERED=1 pip install -r scripts/requirements.txt 2>(tee -a ~/buildjob.log >&2)
- run: env PYTHONUNBUFFERED=1 scripts/generate-roa.sh 2>(tee -a ~/buildjob.log >&2)
- run: git -C generated diff README.md
- uses: actions/upload-artifact@v2
with:
name: generated
path: generated
comment_success:
needs: [build]
runs-on: ubuntu-20.04
if: needs.build.result == 'success'
steps:
- uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.COMMENT_GITHUB_TOKEN }}
message: |
Congratulations! Your pull request passed the check.
comment_failure:
needs: [build]
runs-on: ubuntu-20.04
if: needs.build.result == 'failure'
steps:
- run: tail ~/buildjob.log > ~/buildjob_tail.log
- uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ secrets.COMMENT_GITHUB_TOKEN }}
filePath: ~/buildjob_tail.log