Skip to content

Commit e3b2147

Browse files
turbomamclaude
andcommitted
Add actionlint CI to lint workflow files (incl. shellcheck on run: blocks)
actionlint lints the GitHub Actions workflows and runs shellcheck on every run: block. This is the class of bug that bit the freshness PR (set -o pipefail under the container's dash shell) and would have been caught statically. Pinned to the official rhysd/actionlint image by version. Also fixes the three SC2086 findings it surfaced: quote $GITHUB_PATH in the uv-install steps of python-quality.yml and metpo-content-lint.yml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f683032 commit e3b2147

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/actionlint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: actionlint
2+
3+
# Lints the GitHub Actions workflow files themselves. actionlint also runs
4+
# shellcheck on every `run:` block, which catches shell bugs in workflows (for
5+
# example, the `set -o pipefail` that fails under the container's default dash
6+
# shell, and unquoted variables). Pinned to the official image by version.
7+
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
branches: [main]
13+
workflow_dispatch:
14+
15+
jobs:
16+
actionlint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v6
20+
- name: Run actionlint
21+
run: docker run --rm -v "${{ github.workspace }}":/repo --workdir /repo rhysd/actionlint:1.7.12

.github/workflows/metpo-content-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install uv
3535
run: |
3636
curl -LsSf https://astral.sh/uv/install.sh | sh
37-
echo "$HOME/.local/bin" >> $GITHUB_PATH
37+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
3838
3939
- name: Install dependencies
4040
run: uv sync

.github/workflows/python-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Install uv
2626
run: |
2727
curl -LsSf https://astral.sh/uv/install.sh | sh
28-
echo "$HOME/.local/bin" >> $GITHUB_PATH
28+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
2929
3030
- name: Install dependencies
3131
run: |
@@ -67,7 +67,7 @@ jobs:
6767
- name: Install uv
6868
run: |
6969
curl -LsSf https://astral.sh/uv/install.sh | sh
70-
echo "$HOME/.local/bin" >> $GITHUB_PATH
70+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
7171
7272
- name: Install dependencies
7373
run: |

0 commit comments

Comments
 (0)