Skip to content

Commit

Permalink
create var for status check msg
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Jun 3, 2024
1 parent d1ec8b2 commit 38b310b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@ jobs:
# The workflow_dispatch event does not have a ref-to-build input
# And when dereferencing a non-existent input, it will return an empty string
# We have to pass in a valid sha, so just use github.ref by default
run: echo STATUS_CHECK_COMMIT_SHA=${{ inputs.ref-to-build != '' && inputs.ref-to-build || github.sha }} >> $GITHUB_ENV
run: echo COMMIT_SHA_FOR_STATUS_CHECK=${{ inputs.ref-to-build != '' && inputs.ref-to-build || github.sha }} >> $GITHUB_ENV

- name: Create status check message
run: echo STATUS_CHECK_MESSAGE="cibuildwheel (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV

- name: Show job status for commit
uses: myrotvorets/[email protected]
if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }}
with:
sha: ${{ env.STATUS_CHECK_COMMIT_SHA }}
context: "Build wheels (${{ env.BUILD_IDENTIFIER }})"
sha: ${{ env.COMMIT_SHA_FOR_STATUS_CHECK }}
context: ${{ env.STATUS_CHECK_MESSAGE }}

- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -170,6 +173,6 @@ jobs:
uses: myrotvorets/[email protected]
if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }}
with:
sha: ${{ env.STATUS_CHECK_COMMIT_SHA }}
sha: ${{ env.COMMIT_SHA_FOR_STATUS_CHECK }}
status: ${{ job.status }}
context: "Build wheels (${{ env.BUILD_IDENTIFIER }})"
context: ${{ env.STATUS_CHECK_MESSAGE }}

0 comments on commit 38b310b

Please sign in to comment.