-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (36 loc) · 1.16 KB
/
recipefile-dependency-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Checks - Recipe dependencies
on:
pull_request:
paths:
- "src/**"
- "!src/site/**"
jobs:
gen-matrix:
name: Validate recipe file dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changed files
id: diff
uses: tj-actions/changed-files@v44
with:
json: true
dir_names_exclude_current_dir: true
- name: Get recipes with out-of-sync dependencies
uses: actions/github-script@v7
id: generator
with:
script: |
const script = require('.github/scripts/validate-dependencies.js');
return script('${{ steps.diff.outputs.all_changed_files }}', '${{ github.workspace }}');
- name: Validate
uses: actions/github-script@v7
with:
script: |
const errors = JSON.parse('${{ steps.generator.outputs.result }}');
if (errors.length === 0) {
return;
}
console.log(errors);
core.setFailed("Encountered recipe files with out-of-sync dependencies. See the above logs for more information.");