File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,26 @@ jobs:
4343 custom_version : ${{ inputs.custom_version }}
4444 existing_changelog_path : CHANGELOG.md
4545
46+ # If github.ref points to a [skip ci] commit, we assume that it was added by the pre_release workflow,
47+ # which doesn't push the commit if code checks don't pass.
48+ # Otherwise, the checks will have been triggered by the `run_code_checks` workflow.
4649 wait_for_checks :
4750 name : Wait for code checks to pass
4851 runs-on : ubuntu-latest
4952 steps :
53+ - name : Checkout repository
54+ uses : actions/checkout@v4
55+ - name : Check if the head commit contains [skip ci]
56+ id : check_skip
57+ run : |
58+ if git log --format=%B -n 1 ${{ github.sha }} | head -n 1 | grep '\[skip ci\]$'; then
59+ echo 'skipped=true' >> $GITHUB_OUTPUT
60+ else
61+ echo 'skipped=false' >> $GITHUB_OUTPUT
62+ fi
63+
506465+ if : ${{ steps.check_skip.outputs.skipped == 'false' }}
5166 with :
5267 ref : ${{ github.ref }}
5368 repo-token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments