Skip to content

Commit d2de03f

Browse files
committed
chore(ci): move checkout out of composite setup action
The composite action at .github/actions/setup previously included actions/checkout@v6 as its first step, which is structurally impossible: GitHub Actions must load .github/actions/setup/action.yml from disk before it can execute the composite, but that file only exists on disk after actions/checkout has run. Result: every job using the composite failed with "Can't find 'action.yml' ... Did you forget to run actions/checkout before running your local action?" Fix: remove the checkout step from the composite action, and add - uses: actions/checkout@v6 as the explicit first step of each of the 7 jobs that use the composite (prepare, lint, typecheck, test, repo-integrity, build, pkg-pr-new). The composite still centralises pnpm + node + install. The checkout duplication is unavoidable because of how GitHub Actions resolves local composite action paths. Bug introduced in b819734 (Stage 1c). Caught on first post-push CI run.
1 parent c5cf891 commit d2de03f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Setup
2-
description: Checkout, pnpm, node, and install dependencies
2+
description: pnpm, node, and install dependencies (assumes repo is already checked out)
33
runs:
44
using: composite
55
steps:
6-
- uses: actions/checkout@v6
76
- uses: pnpm/action-setup@v4
87
- uses: actions/setup-node@v4
98
with:

.github/workflows/pr-checks.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ jobs:
1010
prepare:
1111
runs-on: ubuntu-latest
1212
steps:
13+
- uses: actions/checkout@v6
1314
- uses: ./.github/actions/setup
1415

1516
lint:
1617
needs: prepare
1718
runs-on: ubuntu-latest
1819
steps:
20+
- uses: actions/checkout@v6
1921
- uses: ./.github/actions/setup
2022
- name: Run linter
2123
run: pnpm lint
@@ -24,6 +26,7 @@ jobs:
2426
needs: prepare
2527
runs-on: ubuntu-latest
2628
steps:
29+
- uses: actions/checkout@v6
2730
- uses: ./.github/actions/setup
2831
- name: Run type checking
2932
run: pnpm typecheck
@@ -32,6 +35,7 @@ jobs:
3235
needs: prepare
3336
runs-on: ubuntu-latest
3437
steps:
38+
- uses: actions/checkout@v6
3539
- uses: ./.github/actions/setup
3640
- name: Run tests with coverage
3741
run: pnpm test:run --coverage
@@ -46,6 +50,7 @@ jobs:
4650
needs: prepare
4751
runs-on: ubuntu-latest
4852
steps:
53+
- uses: actions/checkout@v6
4954
- uses: ./.github/actions/setup
5055
- name: Run knip check
5156
run: pnpm repo:knip
@@ -56,6 +61,7 @@ jobs:
5661
runs-on: ubuntu-latest
5762
needs: [prepare]
5863
steps:
64+
- uses: actions/checkout@v6
5965
- uses: ./.github/actions/setup
6066
- name: Build packages
6167
run: pnpm build
@@ -115,6 +121,7 @@ jobs:
115121
needs: [build]
116122
runs-on: ubuntu-latest
117123
steps:
124+
- uses: actions/checkout@v6
118125
- uses: ./.github/actions/setup
119126
- name: Download dist artifact
120127
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)