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