-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (85 loc) · 3.09 KB
/
validate.yml
File metadata and controls
104 lines (85 loc) · 3.09 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Validate Registry
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate-manifests:
name: Validate plugin manifests against JSON Schema
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '24'
- name: Install ajv-cli
run: npm install --global ajv-cli
- name: Validate all plugin manifests
run: bash scripts/validate-manifests.sh
- name: Validate every plugin has a category assigned
run: bash scripts/categorize-manifests.sh --check
validate-core-manifests:
name: Validate core manifests against workflow plugins
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out registry
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Check out workflow
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
repository: GoCodeAlone/workflow
path: _workflow
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: '1.26.4'
cache: false
- name: Cache Go modules
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-1.26.4-${{ hashFiles('_workflow/go.sum') }}
restore-keys: |
${{ runner.os }}-go-1.26.4-
- name: Set up wfctl
uses: GoCodeAlone/setup-wfctl@bcd880980f5bbe8d192d0c20ff6279d25331f956 # v1
with:
version: v0.74.6
- name: Validate core plugin manifests
run: wfctl plugin registry-sync core --registry-dir . --workflow-repo "$GITHUB_WORKSPACE/_workflow"
- name: Validate README is generated
run: wfctl plugin registry-sync readme --check --registry-dir .
validate-templates:
name: Validate template plugin references
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Validate template YAML files
run: bash scripts/validate-templates.sh
validate-index-projection:
name: Validate v1/index.json allowlist projection
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install jq (Ubuntu ships with it but verify)
run: |
if ! command -v jq >/dev/null; then
sudo apt-get update && sudo apt-get install -y jq
fi
jq --version
- name: Run primary projection contract
run: bash tests/test-build-index.sh
- name: Run schema↔allowlist drift guard
run: bash tests/test-schema-allowlist-coverage.sh