Skip to content

Commit

Permalink
move add-pass-label step as a job (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
yichengt900 authored Jun 1, 2024
1 parent ee71ae7 commit e1c4737
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/CEFI_MOM6-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,12 @@ jobs:
exit 10
fi
add-pass-label:
needs: run-CEFI_MOM6-ci
runs-on: self-hosted
if: ${{ needs.run-CEFI_MOM6-ci.result == 'success' }}
steps:
- name: Add "pass_CEFI_MOM6_RT" label on success
if: success() && contains(github.event.label.name, 'CEFI_MOM6_RT_gaea_c5')
run: |
TOKEN=${{ secrets.GITHUB_TOKEN }}
RT_TEST_LABEL="CEFI_MOM6_RT_gaea_c5"
Expand All @@ -106,7 +110,6 @@ jobs:
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/issues/${{ env.PR_NUMBER }}/labels/$RT_TEST_LABEL"
# Add the "pass_CEFI_MOM6_RT" label
curl -X POST \
Expand All @@ -116,7 +119,7 @@ jobs:
-d "{\"labels\":[\"$PASS_LABEL\"]}"
clean-up:
needs: run-CEFI_MOM6-ci
needs: add-pass-label
runs-on: self-hosted
strategy:
max-parallel: 1
Expand Down

0 comments on commit e1c4737

Please sign in to comment.