File tree 1 file changed +28
-2
lines changed
1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows
9
9
on :
10
+ create :
10
11
push :
11
12
paths :
12
13
- " .github/workflows/check-taskfiles.ya?ml"
28
29
repository_dispatch :
29
30
30
31
jobs :
32
+ run-determination :
33
+ runs-on : ubuntu-latest
34
+ outputs :
35
+ result : ${{ steps.determination.outputs.result }}
36
+ steps :
37
+ - name : Determine if the rest of the workflow should run
38
+ id : determination
39
+ run : |
40
+ RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
41
+ # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
42
+ if [[
43
+ "${{ github.event_name }}" != "create" ||
44
+ "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
45
+ ]]; then
46
+ # Run the other jobs.
47
+ RESULT="true"
48
+ else
49
+ # There is no need to run the other jobs.
50
+ RESULT="false"
51
+ fi
52
+
53
+ echo "result=$RESULT" >> $GITHUB_OUTPUT
54
+
31
55
validate :
32
56
name : Validate ${{ matrix.file }}
57
+ needs : run-determination
58
+ if : needs.run-determination.outputs.result == 'true'
33
59
runs-on : ubuntu-latest
34
60
35
61
strategy :
53
79
id : download-schema
54
80
uses : carlosperate/download-file-action@v2
55
81
with :
56
- # See : https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
57
- file-url : https://json.schemastore.org/taskfile .json
82
+ # Source : https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
83
+ file-url : https://taskfile.dev/schema .json
58
84
location : ${{ runner.temp }}/taskfile-schema
59
85
60
86
- name : Install JSON schema validator
You can’t perform that action at this time.
0 commit comments