Skip to content

Commit 9d6ff9c

Browse files
committed
Skip a duplicated checkout
1 parent d67880a commit 9d6ff9c

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/actions/setup/directories/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ inputs:
2929
description: >-
3030
If set to true, additionally runs `make up`.
3131
32+
checkout:
33+
required: false
34+
type: boolean
35+
default: true
36+
description: >-
37+
If set to '' (false), skip running actions/checkout. This is useful when
38+
you don't want to overwrite a GitHub token that is already set up.
39+
3240
dummy-files:
3341
required: false
3442
type: boolean

.github/workflows/check_misc.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: ./.github/actions/setup/directories
20-
with:
21-
makeup: true
22-
2319
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
2420
with:
2521
token: ${{ secrets.MATZBOT_GITHUB_TOKEN }}
2622

23+
- uses: ./.github/actions/setup/directories
24+
with:
25+
makeup: true
26+
# Skip overwriting MATZBOT_GITHUB_TOKEN
27+
checkout: '' # false (ref: https://github.com/actions/runner/issues/2238)
28+
2729
- name: Check if C-sources are US-ASCII
2830
run: |
2931
grep -r -n '[^ -~]' -- *.[chy] include internal win32/*.[ch] && exit 1 || :

0 commit comments

Comments
 (0)