Skip to content

[framework-best-practices] Use actionlint native workflow discovery instead of hand-maintained workflow allowlist #1775

Description

@github-actions

Framework / Library Best Practices Findings

1. Replace hand-maintained lint target list with actionlint's native workflow discovery

Library: actionlint 1.7.12 (Makefile line 2)
Library feature: built-in repository/workflow discovery (actionlint run without manually enumerating each workflow file)
Current code: Makefile lines 233-238 manually enumerate only trigger-*.yml, ci.yml, release.yml, and smoke-test-install.yml for .github/workflows linting:

find .github/workflows -maxdepth 1 \
  \( -name 'trigger-*.yml' -o -name 'trigger-*.yaml' -o -name 'ci.yml' -o -name 'release.yml' -o -name 'smoke-test-install.yml' \)

This currently skips multiple hand-authored, non-lock workflows:

  • .github/workflows/agentics-maintenance.yml
  • .github/workflows/ci-tests.yml
  • .github/workflows/claude-mention-in-issue.yml
  • .github/workflows/claude-mention-in-pr.yml
  • .github/workflows/minimize-resolved-pr-reviews.yml
  • .github/workflows/mkdocs.yml

What is wrong: workflow lint coverage is defined by a growing allowlist rather than the linter's native discovery behavior. New hand-authored workflows can be added without being linted unless someone updates this list.
Why it matters: syntax and workflow-structure defects in omitted workflows can bypass CI lint checks, reducing reliability of repository automation.
Simplification: run actionlint against workflow directories using native discovery, and only exclude machine-generated lock files if needed. This removes the brittle allowlist and keeps lint coverage aligned automatically as workflows are added.

Documentation: https://github.com/rhysd/actionlint#usage

Suggested Actions

  • Update make lint-workflows to use actionlint native workflow discovery for .github/workflows
  • Keep an explicit exclusion for generated *.lock.yml files if required
  • Remove or minimize manual workflow filename allowlists to prevent coverage drift

What is this? | From workflow: Trigger Framework Best Practices

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

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions