Skip to content

Commit 4e96a22

Browse files
authored
ci(repo): add actionlint workflow check (#8874)
1 parent 08157f8 commit 4e96a22

5 files changed

Lines changed: 64 additions & 2 deletions

File tree

.changeset/sdk-79-actionlint.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.github/actionlint.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Configuration for actionlint (run by .github/workflows/actionlint.yml).
2+
# See SDK-79 / Monorepo Supply-Chain Hardening.
3+
4+
self-hosted-runner:
5+
# Blacksmith self-hosted runner labels. actionlint cannot know custom runner
6+
# labels, so declare them here to avoid false "unknown runner label" errors.
7+
labels:
8+
- blacksmith-8vcpu-ubuntu-2204
9+
- blacksmith-6vcpu-macos-26

.github/workflows/actionlint.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Actionlint
2+
3+
# Lint GitHub Actions workflows for syntax errors, unsafe patterns, and shell
4+
# bugs. Part of SDK-79 / Monorepo Supply-Chain Hardening. Runs on every PR so it
5+
# always reports a status and can be wired up as a required check.
6+
7+
on:
8+
pull_request:
9+
push:
10+
branches:
11+
- main
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
actionlint:
22+
name: Lint workflows
23+
runs-on: ${{ vars.RUNNER_NORMAL || 'ubuntu-latest' }}
24+
timeout-minutes: ${{ vars.TIMEOUT_MINUTES_SHORT && fromJSON(vars.TIMEOUT_MINUTES_SHORT) || 5 }}
25+
steps:
26+
- name: Checkout repo
27+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
28+
with:
29+
persist-credentials: false
30+
show-progress: false
31+
sparse-checkout: .github
32+
sparse-checkout-cone-mode: false
33+
34+
- name: Run actionlint
35+
# Pinned by digest (immutable). rhysd/actionlint 1.7.12; the image bundles a
36+
# matching shellcheck. Bump the version and refresh the digest together.
37+
uses: docker://rhysd/actionlint@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667
38+
env:
39+
# Intentional word-splitting ($TURBO_ARGS etc., SC2086) and minor style
40+
# (SC2129, SC2162) are excluded; every other shellcheck rule stays on.
41+
SHELLCHECK_OPTS: --exclude=SC2086,SC2129,SC2162
42+
with:
43+
args: -color

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,6 @@ jobs:
498498
E2E_CLERK_UI_VERSION: "latest"
499499
E2E_NEXTJS_VERSION: ${{ matrix.next-version }}
500500
E2E_PROJECT: ${{ matrix.test-project }}
501-
E2E_CLERK_ENCRYPTION_KEY: ${{ matrix.clerk-encryption-key }}
502501
INTEGRATION_INSTANCE_KEYS: ${{ secrets.INTEGRATION_INSTANCE_KEYS }}
503502
NODE_EXTRA_CA_CERTS: ${{ github.workspace }}/integration/certs/rootCA.pem
504503
VERCEL_AUTOMATION_BYPASS_SECRET: ${{ secrets.VERCEL_AUTOMATION_BYPASS_SECRET }}

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,16 @@ jobs:
224224
- name: Generate notification payload
225225
id: notification
226226
if: steps.changesets.outputs.published == 'true'
227-
run: payload=$(node scripts/notify.mjs '${{ steps.changesets.outputs.publishedPackages }}' '${{ github.actor }}') && echo ::set-output name=payload::${payload//$'\n'/'%0A'}
227+
env:
228+
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }}
229+
GH_ACTOR: ${{ github.actor }}
230+
run: |
231+
payload="$(node scripts/notify.mjs "$PUBLISHED_PACKAGES" "$GH_ACTOR")"
232+
{
233+
echo 'payload<<__NOTIFY_EOF__'
234+
echo "$payload"
235+
echo '__NOTIFY_EOF__'
236+
} >> "$GITHUB_OUTPUT"
228237
229238
- name: Send commit log to Slack
230239
id: slack

0 commit comments

Comments
 (0)