Skip to content

[bug-hunter] setup-actionlint does not update existing stale actionlint binary #1705

Description

@github-actions

Impact

Developers and CI environments that cache bin/actionlint can silently keep running an older actionlint version after the repository bumps ACTIONLINT_VERSION. This causes inconsistent lint behavior across environments and can miss or misreport workflow validation problems.

Reproduction Steps

  1. From repository root, run:
    mkdir -p bin
    cat > bin/actionlint <<'EOF'
    #!/usr/bin/env bash
    echo "actionlint v1.7.10"
    EOF
    chmod +x bin/actionlint
    make setup-actionlint ACTIONLINT_VERSION=1.7.12
    bin/actionlint --version
  2. Observe the setup output and binary version.

Expected vs Actual

Expected: make setup-actionlint should reinstall/upgrade actionlint when the existing binary version does not match ACTIONLINT_VERSION.

Actual: setup only checks whether bin/actionlint exists, prints it as already installed, and leaves the stale version in place.

Observed output:

Setting up actionlint...
✓ actionlint already installed: actionlint v1.7.10
actionlint v1.7.10

Failing Test

#!/usr/bin/env bash
set -euo pipefail

mkdir -p bin
cat > bin/actionlint <<'EOF'
#!/usr/bin/env bash
echo "actionlint v1.7.10"
EOF
chmod +x bin/actionlint

make setup-actionlint ACTIONLINT_VERSION=1.7.12
actual="$(bin/actionlint --version)"

if [ "$actual" != "actionlint v1.7.12" ]; then
  echo "FAIL: expected actionlint v1.7.12, got: $actual"
  exit 1
fi

Evidence

  • Makefile:2 defines the pinned target version (ACTIONLINT_VERSION := 1.7.12).
  • Makefile:218-220 treats any existing bin/actionlint as valid without comparing versions.
  • Because the download/install branch (Makefile:221-226) is gated only on file existence, stale binaries are never upgraded.

What is this? | From workflow: Trigger Bug Hunter

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  • expires on Aug 5, 2026, 11:56 AM UTC

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions