Skip to content

Lint Composite Actions Under .github/actions in the Validate Gate #2335

Closed

Description

@ptr727

Problem

Nothing in the fleet's validate gate lints a composite action under .github/actions/. actionlint checks workflow files only and doesn't read a composite action's run: bodies. So shell moved out of a workflow into a hook, such as the build-release-asset hook that build-release-task.yml calls, loses shellcheck coverage and schema checking without anyone noticing.

Every fleet repo that adopts a hub task hook is affected, and the hook pattern is growing (the release chain now, and possibly a test-install hook for the gates stage).

The maintainer asked for this to be prioritized.

How one repo covered it

ptr727/homeassistant-purpleair#404 added two steps to its docs-lint job, both globbing .github/actions/*/action.yml, so any new hook is covered automatically:

  • Shell: for each action, iterate .runs.steps with the runner's preinstalled yq, write each non-empty run: body to a temp file, then run shellcheck -s bash over all of them.
  • Schema: pipx run check-jsonschema --builtin-schema vendor.github-actions -- .github/actions/*/action.yml.

Ask

Add the same coverage to validate-task.yml (or repo_gate.py), so it runs wherever the hub gate runs, and drop the need for each adopter to carry it. Skip the step cleanly when .github/actions/ doesn't exist.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions