File tree Expand file tree Collapse file tree 6 files changed +205
-0
lines changed
dependabot/workflow-template-copies/.github/workflows Expand file tree Collapse file tree 6 files changed +205
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-taskfiles.md
2
+ name : Check Taskfiles
3
+
4
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5
+ on :
6
+ push :
7
+ paths :
8
+ - " .github/workflows/check-taskfiles.ya?ml"
9
+ - " **/Taskfile.ya?ml"
10
+ pull_request :
11
+ paths :
12
+ - " .github/workflows/check-taskfiles.ya?ml"
13
+ - " **/Taskfile.ya?ml"
14
+ schedule :
15
+ # Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
16
+ - cron : " 0 8 * * TUE"
17
+ workflow_dispatch :
18
+ repository_dispatch :
19
+
20
+ jobs :
21
+ validate :
22
+ name : Validate ${{ matrix.file }}
23
+ runs-on : ubuntu-latest
24
+
25
+ strategy :
26
+ fail-fast : false
27
+
28
+ matrix :
29
+ file :
30
+ # TODO: add paths to any additional Taskfiles here
31
+ - ./**/Taskfile.yml
32
+
33
+ steps :
34
+ - name : Checkout repository
35
+ uses : actions/checkout@v2
36
+
37
+ - name : Download JSON schema for Taskfiles
38
+ id : download-schema
39
+ uses : carlosperate/download-file-action@v1.0.3
40
+ with :
41
+ # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
42
+ file-url : https://json.schemastore.org/taskfile.json
43
+ location : ${{ runner.temp }}/taskfile-schema
44
+
45
+ - name : Install JSON schema validator
46
+ run : sudo npm install --global ajv-cli
47
+
48
+ - name : Validate ${{ matrix.file }}
49
+ run : |
50
+ # See: https://github.com/ajv-validator/ajv-cli#readme
51
+ ajv validate \
52
+ --strict=false \
53
+ -s "${{ steps.download-schema.outputs.file-path }}" \
54
+ -d "${{ matrix.file }}"
Original file line number Diff line number Diff line change 8
8
[ ![ Check Configuration Files Sync status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-config-sync.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-config-sync.yml )
9
9
[ ![ Check Markdown status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-markdown-task.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-markdown-task.yml )
10
10
[ ![ Check Prettier Formatting status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-prettier-formatting-task.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-prettier-formatting-task.yml )
11
+ [ ![ Check Taskfiles status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-taskfiles.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-taskfiles.yml )
12
+
11
13
12
14
The [ Arduino] ( https://www.arduino.cc/ ) Tooling Team's collection of reusable project infrastructure assets.
13
15
Original file line number Diff line number Diff line change 45
45
"{{.WORKFLOW_TEMPLATES_PATH}}/check-general-formatting-task.yml" \
46
46
"{{.WORKFLOW_TEMPLATES_PATH}}/check-markdown-task.yml" \
47
47
"{{.WORKFLOW_TEMPLATES_PATH}}/check-prettier-formatting-task.yml" \
48
+ "{{.WORKFLOW_TEMPLATES_PATH}}/check-taskfiles.yml" \
48
49
"{{.WORKFLOWS_PATH}}"
49
50
50
51
config:sync :
Original file line number Diff line number Diff line change
1
+ # "Check Taskfiles" workflow
2
+
3
+ Workflow file: [ check-taskfiles.yml] ( check-taskfiles.yml )
4
+
5
+ Validate the repository's [ Taskfiles] ( https://taskfile.dev/#/usage ) against the JSON schema.
6
+
7
+ ## Readme badge
8
+
9
+ Markdown badge:
10
+
11
+ ``` markdown
12
+ [](https://github.com/REPO_OWNER/REPO_NAME/actions/workflows/check-taskfiles.yml)
13
+ ```
14
+
15
+ Replace the ` REPO_OWNER ` and ` REPO_NAME ` placeholders in the URLs with the final repository owner and name ([ example] ( https://raw.githubusercontent.com/arduino-libraries/ArduinoIoTCloud/master/README.md ) ).
16
+
17
+ ---
18
+
19
+ Asciidoc badge:
20
+
21
+ ``` adoc
22
+ image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-taskfiles.yml/badge.svg["Check Taskfiles status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-taskfiles.yml"]
23
+ ```
24
+
25
+ Define the `{repository-owner}` and `{repository-name}` attributes and use them throughout the readme ([example](https://raw.githubusercontent.com/arduino-libraries/WiFiNINA/master/README.adoc)).
26
+
27
+ ## Commit message
28
+
29
+ ```
30
+ Add CI workflow to validate Taskfiles
31
+
32
+ On every push or pull request that affects the repository's Taskfiles, and periodically, validate them
33
+ against the JSON schema.
34
+ ```
35
+
36
+ ## PR message
37
+
38
+ ```markdown
39
+ On every push or pull request that affects the repository's [Taskfiles](https://taskfile.dev/#/usage), and periodically, validate them against the JSON schema.
40
+ ```
Original file line number Diff line number Diff line change
1
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-taskfiles.md
2
+ name : Check Taskfiles
3
+
4
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5
+ on :
6
+ push :
7
+ paths :
8
+ - " .github/workflows/check-taskfiles.ya?ml"
9
+ - " **/Taskfile.ya?ml"
10
+ pull_request :
11
+ paths :
12
+ - " .github/workflows/check-taskfiles.ya?ml"
13
+ - " **/Taskfile.ya?ml"
14
+ schedule :
15
+ # Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
16
+ - cron : " 0 8 * * TUE"
17
+ workflow_dispatch :
18
+ repository_dispatch :
19
+
20
+ jobs :
21
+ validate :
22
+ name : Validate ${{ matrix.file }}
23
+ runs-on : ubuntu-latest
24
+
25
+ strategy :
26
+ fail-fast : false
27
+
28
+ matrix :
29
+ file :
30
+ # TODO: add paths to any additional Taskfiles here
31
+ - ./**/Taskfile.yml
32
+
33
+ steps :
34
+ - name : Checkout repository
35
+ uses : actions/checkout@v2
36
+
37
+ - name : Download JSON schema for Taskfiles
38
+ id : download-schema
39
+ uses : carlosperate/download-file-action@v1.0.3
40
+ with :
41
+ # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
42
+ file-url : https://json.schemastore.org/taskfile.json
43
+ location : ${{ runner.temp }}/taskfile-schema
44
+
45
+ - name : Install JSON schema validator
46
+ run : sudo npm install --global ajv-cli
47
+
48
+ - name : Validate ${{ matrix.file }}
49
+ run : |
50
+ # See: https://github.com/ajv-validator/ajv-cli#readme
51
+ ajv validate \
52
+ --strict=false \
53
+ -s "${{ steps.download-schema.outputs.file-path }}" \
54
+ -d "${{ matrix.file }}"
Original file line number Diff line number Diff line change
1
+ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-taskfiles.md
2
+ name : Check Taskfiles
3
+
4
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5
+ on :
6
+ push :
7
+ paths :
8
+ - " .github/workflows/check-taskfiles.ya?ml"
9
+ - " **/Taskfile.ya?ml"
10
+ pull_request :
11
+ paths :
12
+ - " .github/workflows/check-taskfiles.ya?ml"
13
+ - " **/Taskfile.ya?ml"
14
+ schedule :
15
+ # Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
16
+ - cron : " 0 8 * * TUE"
17
+ workflow_dispatch :
18
+ repository_dispatch :
19
+
20
+ jobs :
21
+ validate :
22
+ name : Validate ${{ matrix.file }}
23
+ runs-on : ubuntu-latest
24
+
25
+ strategy :
26
+ fail-fast : false
27
+
28
+ matrix :
29
+ file :
30
+ # TODO: add paths to any additional Taskfiles here
31
+ - ./**/Taskfile.yml
32
+
33
+ steps :
34
+ - name : Checkout repository
35
+ uses : actions/checkout@v2
36
+
37
+ - name : Download JSON schema for Taskfiles
38
+ id : download-schema
39
+ uses : carlosperate/download-file-action@v1.0.3
40
+ with :
41
+ # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json
42
+ file-url : https://json.schemastore.org/taskfile.json
43
+ location : ${{ runner.temp }}/taskfile-schema
44
+
45
+ - name : Install JSON schema validator
46
+ run : sudo npm install --global ajv-cli
47
+
48
+ - name : Validate ${{ matrix.file }}
49
+ run : |
50
+ # See: https://github.com/ajv-validator/ajv-cli#readme
51
+ ajv validate \
52
+ --strict=false \
53
+ -s "${{ steps.download-schema.outputs.file-path }}" \
54
+ -d "${{ matrix.file }}"
You can’t perform that action at this time.
0 commit comments