Skip to content

Commit 32ab91a

Browse files
committed
feat(action-lint)!: drop runner-labels input; consumers commit .github/actionlint.yaml directly per actionlint convention
1 parent 2404c67 commit 32ab91a

1 file changed

Lines changed: 4 additions & 39 deletions

File tree

‎.github/workflows/action-lint.yaml‎

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ on:
66
runs-on:
77
description: >-
88
Runner label. Defaults to ubuntu-latest. Override to a self-hosted
9-
runner label if you want to run CI on your own scale set; pair with
10-
runner-labels so actionlint accepts the label.
9+
runner label if you want to run CI on your own scale set. To
10+
register custom self-hosted runner labels with actionlint, commit
11+
a .github/actionlint.yaml file in the calling repo — see
12+
https://github.com/rhysd/actionlint/blob/main/docs/config.md.
1113
required: false
1214
default: ubuntu-latest
1315
type: string
@@ -21,18 +23,6 @@ on:
2123
required: false
2224
default: v1.7.12
2325
type: string
24-
runner-labels:
25-
description: >-
26-
Comma- or newline-separated list of self-hosted runner label names
27-
(e.g. "fast-runner,gpu-runner"). When set, the workflow writes a
28-
temporary .github/actionlint.yaml registering these labels so
29-
actionlint doesn't flag `runs-on: <label>` as unknown. Ignored if
30-
the calling repo already commits a .github/actionlint.yaml. Leave
31-
empty (default) if you only use GitHub-hosted runners or ship your
32-
own actionlint config.
33-
required: false
34-
default: ""
35-
type: string
3626

3727
permissions:
3828
contents: read
@@ -57,31 +47,6 @@ jobs:
5747
GOBIN="$RUNNER_TEMP/bin" go install github.com/rhysd/actionlint/cmd/actionlint@${{ inputs.actionlint-version }}
5848
echo "$RUNNER_TEMP/bin" >> "$GITHUB_PATH"
5949
60-
# Register self-hosted runner labels with actionlint when the caller
61-
# passes them as input. Skipped if the calling repo already ships its
62-
# own .github/actionlint.yaml — that takes precedence.
63-
- name: Register runner labels
64-
if: inputs.runner-labels != ''
65-
shell: bash
66-
env:
67-
LABELS: ${{ inputs.runner-labels }}
68-
run: |
69-
if [ -f .github/actionlint.yaml ] || [ -f .github/actionlint.yml ]; then
70-
echo "Calling repo provides its own .github/actionlint.yaml — leaving untouched"
71-
exit 0
72-
fi
73-
mkdir -p .github
74-
{
75-
echo "self-hosted-runner:"
76-
echo " labels:"
77-
echo "${LABELS}" | tr ',' '\n' | while IFS= read -r label; do
78-
label="$(echo "${label}" | tr -d '[:space:]')"
79-
[ -n "${label}" ] && echo " - ${label}"
80-
done
81-
} > .github/actionlint.yaml
82-
echo "Wrote .github/actionlint.yaml from runner-labels input:"
83-
cat .github/actionlint.yaml
84-
8550
- name: Run actionlint
8651
id: actionlint
8752
run: actionlint

0 commit comments

Comments
 (0)