File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed
Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 1616 tags-ignore :
1717 - ' **'
1818jobs :
19+ checkExecution :
20+ runs-on : ubuntu-latest
21+ outputs :
22+ shouldExecute : ${{ steps.stepCheckExecution.outputs.shouldExecute }}
23+ steps :
24+ - name : Dump GitHub context
25+ run : |
26+ echo "::group::github context"
27+ echo "$GITHUB_CONTEXT"
28+ echo "::endgroup::"
29+ env :
30+ GITHUB_CONTEXT : ${{ toJson(github) }}
31+ - id : stepCheckExecution
32+ name : Check for execution
33+ uses : shiftcode/github-action-skip@v4.0.0
34+ with :
35+ skipOnCommitMsg : ' [skip_build]'
36+ githubToken : ${{ secrets.GITHUB_TOKEN }}
1937 test :
2038 runs-on : ubuntu-latest
39+ needs : checkExecution
40+ # only execute if not skipped by commit message
41+ if : needs.checkExecution.outputs.shouldExecute == 'true'
2142 strategy :
2243 matrix :
2344 # Test with Node.js 24 and v25
4465 build :
4566 runs-on : ubuntu-latest
4667 permissions :
47- contents : write
68+ contents : read
4869 packages : write
49- needs : test
70+ needs : [checkExecution, test]
71+ # only execute if not skipped by commit message
72+ if : needs.checkExecution.outputs.shouldExecute == 'true'
5073 steps :
5174 # checkout branch
5275 - name : Checkout
84107 npm run publish-libs
85108 env :
86109 GITHUB_CONTEXT : ${{ toJson(github) }}
110+ # necessary to commit on protected branch after merging
111+ # and to run actions after version-bump commit (otherwise we can't create rules for merging as no workflows run after GITHUB_TOKEN commits)
112+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
You can’t perform that action at this time.
0 commit comments