Add curl error throw, ensure task only runs on main branch push
Tests / Run-Tests (push) Failing after 8s Details

multiline-output
drunkendog 2023-09-16 16:34:51 +01:00
parent 34668b6750
commit 731392f95f
1 changed files with 4 additions and 4 deletions

View File

@ -18,16 +18,16 @@ jobs:
cd tests/fail/
! python3 ../../run-tests.py
- name: Update badges (success)
if: success()
if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && success()
run: |
curl -X 'GET' \
curl -f -X 'GET' \
'https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&new_badge=Tests-passing-brightgreen' \
-H 'accept: application/json' \
-H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}'
- name: Update badges (fail)
if: failure()
if: needs.pr-check.outputs.number != 'null' && github.ref == 'refs/heads/main' && failure()
run: |
curl -X 'GET' \
curl -f -X 'GET' \
'https://badgeapi.docker.162536.xyz/set_badge/?repo=marmoset-test-cases&new_badge=Tests-failing-red' \
-H 'accept: application/json' \
-H 'X-API-Key: ${{ secrets.BADGE_API_KEY }}'