-
-
Notifications
You must be signed in to change notification settings - Fork 11
56 lines (45 loc) · 1.82 KB
/
workflow-lint.yml
File metadata and controls
56 lines (45 loc) · 1.82 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
name: Workflow Lint
on:
pull_request:
paths:
- ".github/workflows/**"
- "packages/tailwindcss-patch/examples/github-actions/**"
workflow_dispatch:
permissions:
contents: read
jobs:
lint-workflows:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Lint workflow files
uses: rhysd/actionlint@v1
with:
args: >-
-color
.github/workflows/*.yml
packages/tailwindcss-patch/examples/github-actions/*.yml
- name: Validate example workflow wiring
shell: bash
run: |
set -euo pipefail
action_path='packages/tailwindcss-patch/examples/github-actions/actions/validate-migration-report/action.yml'
script_path='packages/tailwindcss-patch/examples/github-actions/scripts/resolve-shards.mjs'
test -f "$action_path"
test -f "$script_path"
rg -n "uses: ./packages/tailwindcss-patch/examples/github-actions/actions/validate-migration-report" \
packages/tailwindcss-patch/examples/github-actions/validate-migration-report.yml \
packages/tailwindcss-patch/examples/github-actions/validate-migration-report-matrix.yml \
packages/tailwindcss-patch/examples/github-actions/validate-migration-report-affected.yml
- name: Check resolver contract snapshot
shell: bash
run: |
set -euo pipefail
expected='packages/tailwindcss-patch/examples/github-actions/resolve-shards-result.dispatch.snapshot.json'
actual="$(mktemp)"
EVENT_NAME=workflow_dispatch \
RESOLVE_SHARDS_OUTPUT=json \
node packages/tailwindcss-patch/examples/github-actions/scripts/resolve-shards.mjs > "$actual"
diff -u "$expected" "$actual"