Skip to content

Commit bc2afc0

Browse files
authored
ci: use sparse checkout for lightweight CI jobs (#7529)
1 parent 3d8fdf5 commit bc2afc0

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/project.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
sparse-checkout: .github
1719
- uses: ./.github/actions/node/latest
18-
# NOTE: Ok this next bit seems unnecessary, right? The problem is that
19-
# this repo is currently incompatible with npm, at least with the
20-
# devDependencies. While this is intended to be corrected, it hasn't yet,
21-
# so the easiest thing to do here is just use a fresh package.json. This
22-
# is needed because actionlint runs an `npm install` at the beginning.
23-
- name: Clear package.json
24-
run: |
25-
rm package.json
26-
npm init -y
2720
- name: actionlint
2821
id: actionlint
2922
uses: raven-actions/actionlint@e01d1ea33dd6a5ed517d95b4c0c357560ac6f518 # v2.1.1
@@ -64,9 +57,13 @@ jobs:
6457
name: Workflow job names (unique)
6558
steps:
6659
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
60+
with:
61+
sparse-checkout: |
62+
.github
63+
scripts/verify-workflow-job-names.js
6764
- uses: ./.github/actions/node/latest
68-
- uses: ./.github/actions/install
69-
- run: npm run verify:workflow-job-names
65+
- run: npm install yaml
66+
- run: node scripts/verify-workflow-job-names.js
7067

7168
# The package size is especially useful in constrained environments, so the
7269
# computation is done only on the package that would be installed there.

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,5 +162,7 @@ jobs:
162162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163163
steps:
164164
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
165+
with:
166+
sparse-checkout: scripts/release/status.js
165167
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
166-
- run: node scripts/release/status
168+
- run: node scripts/release/status.js

0 commit comments

Comments
 (0)