Skip to content

[framework-best-practices] Use stable workflow identifiers and complete action discovery in CI trigger/lint scripts #2234

Open

Description

@github-actions

Framework / Library Best Practices Findings

1. Trigger script dispatches workflows by mutable display name and contains a stale renamed workflow

Library: GitHub CLI (gh) used in scripts/trigger-ci-workflows.sh
Library feature: gh workflow run supports stable workflow file names/IDs; using file/ID avoids rename breakage
Current code:

  • scripts/trigger-ci-workflows.sh:41 hard-codes "Trigger Estc Downstream Health"
  • scripts/trigger-ci-workflows.sh:125 dispatches with gh workflow run "$name" --repo "$REPO" --ref "$REF"
  • Current workflow file is .github/workflows/trigger-internal-downstream-health.yml:3 with name: Trigger Internal Downstream Health

Because dispatch is name-based and the hard-coded name is stale, this script cannot reliably dispatch that workflow after rename and is fragile to future renames.

Simplification: Store workflow file names (or IDs) in the category arrays and dispatch via gh workflow run <workflow-file-or-id>. This uses the CLI’s native stable identifier path and removes rename fragility.

Documentation:

2. lint-actions misses repository composite actions by scanning only hand-maintained roots

Library: action-validator (installed via Makefile)
Library feature: validator can be applied to all action.yml files discovered repository-wide
Current code:

  • Makefile:272 scans only claude-workflows and base:
    • find claude-workflows base -name "action.yml" -o -name "action.yaml" ...
  • Repository contains .github/actions/get-prs-with-merge-conflicts/action.yml, which is outside that search scope.

This leaves at least one composite action unvalidated by make lint-actions, creating avoidable coverage gaps.

Simplification: Replace the hand-maintained search roots with complete discovery (e.g., include .github/actions/**/action.y*ml or repo-wide git ls-files '*action.y*ml' plus path filtering) and run action-validator over that set.

Documentation:

Suggested Actions

  • Switch scripts/trigger-ci-workflows.sh category lists from workflow display names to workflow file names (or IDs), and update dispatch accordingly.
  • Add a regression check ensuring every declared trigger target exists in .github/workflows/trigger-*.yml.
  • Expand lint-actions file discovery to cover .github/actions/**/action.yml (and any future composite action roots).

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

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

Activity

  1. added a commit that references this issue on Oct 2, 2026
    025b80a
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