Skip to content

Commit 971e567

Browse files
serithemageclaude
andcommitted
ci: Add actionlint to validate workflow YAML on push/PR
Catches the class of failure that broke main earlier today (multi-line 'if' literal block, '\${{ }}' inside a 'run' comment) before the change ever lands. Runs only when '.github/workflows/**' changes. SHELLCHECK_OPTS disables SC2086 because the existing scripts intentionally leave \$GITHUB_OUTPUT and friends unquoted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2037728 commit 971e567

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/actionlint.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint Workflows
2+
3+
# Validates GitHub Actions workflow YAML on every change to .github/workflows.
4+
# Catches syntax problems that would otherwise surface only as a "workflow file
5+
# issue" failure on push (e.g. literal '${{ }}' inside run-step comments,
6+
# malformed multi-line if expressions).
7+
8+
on:
9+
push:
10+
branches: [main]
11+
paths:
12+
- '.github/workflows/**'
13+
pull_request:
14+
paths:
15+
- '.github/workflows/**'
16+
17+
jobs:
18+
actionlint:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Run actionlint
24+
env:
25+
# SC2086 fires on $GITHUB_OUTPUT and similar runner-managed vars
26+
# that are safe to leave unquoted. Other shellcheck rules stay on.
27+
SHELLCHECK_OPTS: -e SC2086
28+
shell: bash
29+
run: |
30+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
31+
./actionlint -color

0 commit comments

Comments
 (0)