Skip to content

Commit 103f1dd

Browse files
committed
actionlint: Switch to prebuilt binary instead of docker
Previously `format.sh` and the github workflow used docker or podman to run actionlint. This now will use an installed version if found, and will otherwise download and run a prebuilt binary from a github release. Signed-off-by: Russell Bryant <[email protected]>
1 parent cd2f73b commit 103f1dd

File tree

5 files changed

+19
-31
lines changed

5 files changed

+19
-31
lines changed

.github/workflows/actionlint.dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/actionlint.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ jobs:
3232
with:
3333
fetch-depth: 0
3434

35-
- name: "Download actionlint"
35+
- name: "Run actionlint"
3636
run: |
37-
docker build --tag actionlint - < .github/workflows/actionlint.dockerfile
38-
39-
- name: "Check workflow files"
40-
run: |
41-
echo "::add-matcher::.github/workflows/matchers/actionlint.json"
42-
docker run --volume="${PWD}:/repo" --workdir=/repo actionlint -color
37+
tools/actionlint.sh -color

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,6 @@ hip_compat.h
199199

200200
# Benchmark dataset
201201
benchmarks/*.json
202+
203+
# Linting
204+
actionlint

format.sh

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -287,27 +287,7 @@ fi
287287
echo 'vLLM clang-format: Done'
288288

289289
echo 'vLLM actionlint:'
290-
291-
DOCKER=""
292-
if command -v "docker" &>/dev/null; then
293-
DOCKER="docker"
294-
elif command -v "podman" &>/dev/null; then
295-
DOCKER="podman"
296-
else
297-
echo "Docker or Podman are not installed. Please install one if you want to lint GitHub CI configuration."
298-
fi
299-
300-
actionlint() {
301-
if [ -z "$DOCKER" ]; then
302-
return
303-
fi
304-
# Ensure we use the same version of actionlint as CI
305-
IMAGE="vllm/actionlint:latest"
306-
${DOCKER} build --tag "${IMAGE}" - < .github/workflows/actionlint.dockerfile
307-
${DOCKER} run --volume="${PWD}:/repo:z" --workdir=/repo "${IMAGE}" -color
308-
}
309-
310-
actionlint
290+
tools/actionlint.sh -color
311291
echo 'vLLM actionlint: Done'
312292

313293
if ! git diff --quiet &>/dev/null; then

tools/actionlint.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
if command -v actionlint &> /dev/null; then
4+
actionlint "$@"
5+
exit 0
6+
elif [ -x ./actionlint ]; then
7+
./actionlint "$@"
8+
exit 0
9+
fi
10+
11+
# download a binary to the current directory - v1.7.3
12+
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/aa0a7be8e566b096e64a5df8ff290ec24fa58fbc/scripts/download-actionlint.bash)
13+
./actionlint "$@"

0 commit comments

Comments
 (0)