mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-27 01:40:48 +00:00
avoid dup artifact saving and fail fast if it does not upload
This commit is contained in:
parent
aed230626c
commit
80b6a006ec
20
.github/workflows/tests.yml
vendored
20
.github/workflows/tests.yml
vendored
@ -304,14 +304,16 @@ jobs:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
# part about saving PR number and then using it from auto-merge-dependabot-prs from:
|
||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
|
||||
- name: Save PR number
|
||||
- name: Write PR number to spiffworkflow-backend/pr dir
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
run: |
|
||||
mkdir -p ./pr
|
||||
echo "$PR_NUMBER" > ./pr/pr_number
|
||||
- uses: actions/upload-artifact@v3
|
||||
- name: Upload PR number as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
with:
|
||||
name: pr_number
|
||||
# at https://github.com/sartography/spiff-arena/actions/runs/7757308061/job/21156982087, for example,
|
||||
@ -319,6 +321,7 @@ jobs:
|
||||
# from spiff-arena root rather than the default working-directory we specified, and therefore
|
||||
# trying to explicitly add spiffworkflow-backend to path
|
||||
path: spiffworkflow-backend/pr/
|
||||
if-no-files-found: error
|
||||
|
||||
tests-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
@ -355,19 +358,6 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
# part about saving PR number and then using it from auto-merge-dependabot-prs from:
|
||||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
|
||||
- name: Save PR number
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.number }}
|
||||
run: |
|
||||
mkdir -p ./pr
|
||||
echo "$PR_NUMBER" > ./pr/pr_number
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pr_number
|
||||
path: pr/
|
||||
|
||||
cypress-run:
|
||||
runs-on: ubuntu-latest
|
||||
|
Loading…
x
Reference in New Issue
Block a user