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 77
88# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
99on :
10+ create :
1011 push :
1112 paths :
1213 - " .github/workflows/check-taskfiles.ya?ml"
2627 repository_dispatch :
2728
2829jobs :
30+ run-determination :
31+ runs-on : ubuntu-latest
32+ outputs :
33+ result : ${{ steps.determination.outputs.result }}
34+ steps :
35+ - name : Determine if the rest of the workflow should run
36+ id : determination
37+ run : |
38+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
39+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
40+ if [[
41+ "${{ github.event_name }}" != "create" ||
42+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
43+ ]]; then
44+ # Run the other jobs.
45+ RESULT="true"
46+ else
47+ # There is no need to run the other jobs.
48+ RESULT="false"
49+ fi
50+
51+ echo "result=$RESULT" >> $GITHUB_OUTPUT
52+
2953 validate :
3054 name : Validate ${{ matrix.file }}
55+ needs : run-determination
56+ if : needs.run-determination.outputs.result == 'true'
3157 runs-on : ubuntu-latest
3258
3359 strategy :
5076 id : download-schema
5177 uses : carlosperate/download-file-action@v2
5278 with :
53- # See : https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
54- file-url : https://json.schemastore.org/taskfile .json
79+ # Source : https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
80+ file-url : https://taskfile.dev/schema .json
5581 location : ${{ runner.temp }}/taskfile-schema
5682
5783 - name : Install JSON schema validator
You can’t perform that action at this time.
0 commit comments