File tree 3 files changed +58
-0
lines changed
3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Configuration Files
2
+
3
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4
+ on :
5
+ push :
6
+ paths :
7
+ - " .github/workflows/check-configs.yml"
8
+ - " Taskfile.ya?ml"
9
+ - " **/dependabot.ya?ml"
10
+ pull_request :
11
+ paths :
12
+ - " .github/workflows/check-configs.yml"
13
+ - " Taskfile.ya?ml"
14
+ - " **/dependabot.ya?ml"
15
+ schedule :
16
+ # Run every Tuesday at 8 AM UTC to catch breakage resulting from changes to the JSON schema.
17
+ - cron : " 0 8 * * TUE"
18
+ workflow_dispatch :
19
+ repository_dispatch :
20
+
21
+ jobs :
22
+ validate :
23
+ runs-on : ubuntu-latest
24
+
25
+ steps :
26
+ - name : Checkout repository
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Install Task
30
+ uses : arduino/setup-task@v1
31
+ with :
32
+ repo-token : ${{ secrets.GITHUB_TOKEN }}
33
+ version : 3.x
34
+
35
+ - name : Validate configuration files
36
+ run : task config:validate
Original file line number Diff line number Diff line change 1
1
# Tooling Project Assets
2
2
3
+ [ ![ Check Configuration Files status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-configuration-files.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-configuration-files.yml )
3
4
[ ![ Check License status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-license.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-license.yml )
4
5
[ ![ Check File Duplicates Sync status] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-sync.yml/badge.svg )] ( https://github.com/arduino/tooling-project-assets/actions/workflows/check-sync.yml )
5
6
Original file line number Diff line number Diff line change
1
+ version : " 3"
2
+
3
+ tasks :
4
+ check :
5
+ desc : Check for problems with the project
6
+ deps :
7
+ - task : config:validate
8
+
9
+ config:validate :
10
+ desc : Validate configuration files against their JSON schema
11
+ vars :
12
+ # Last version with support for draft-04, used by Dependabot schema
13
+ AJV_CLI_VERSION : 3.3.0
14
+ # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/dependabot-2.0.json
15
+ DEPENDABOT_SCHEMA_URL : https://json.schemastore.org/dependabot-2.0
16
+ DEPENDABOT_SCHEMA_PATH :
17
+ sh : mktemp -t dependabot-schema-XXXXXXXXXX.json
18
+ DEPENDABOT_DATA_PATH : " **/dependabot.yml"
19
+ cmds :
20
+ - wget --quiet --output-document="{{.DEPENDABOT_SCHEMA_PATH}}" {{.DEPENDABOT_SCHEMA_URL}}
21
+ - npx ajv-cli@{{.AJV_CLI_VERSION}} validate -s "{{.DEPENDABOT_SCHEMA_PATH}}" -d "{{.DEPENDABOT_DATA_PATH}}"
You can’t perform that action at this time.
0 commit comments