diff --git a/format.sh b/format.sh index 39a44cf2a59c6..78dd2a81c1080 100755 --- a/format.sh +++ b/format.sh @@ -287,6 +287,29 @@ else fi echo 'vLLM clang-format: Done' +echo 'vLLM actionlint:' + +DOCKER="" +if command -v "docker" &>/dev/null; then + DOCKER="docker" +elif command -v "podman" &>/dev/null; then + DOCKER="podman" +else + echo "Docker or Podman are not installed. Please install one if you want to lint GitHub CI configuration." +fi + +actionlint() { + if [ -z "$DOCKER" ]; then + return + fi + # Ensure we use the same version of actionlint as CI + IMAGE="vllm/actionlint:latest" + ${DOCKER} build --tag "${IMAGE}" - < .github/workflows/actionlint.dockerfile + ${DOCKER} run --volume="${PWD}:/repo:z" --workdir=/repo "${IMAGE}" -color +} + +actionlint +echo 'vLLM actionlint: Done' if ! git diff --quiet &>/dev/null; then echo 'Reformatted files. Please review and stage the changes.'