Repository navigation
Description
Summary
Add a composite action actions/gate for the CI gate logic. The passed / CI passed job itself stays in each repo's ci.yml.
Why
All five CI workflows (foca, cloud-registry, proTES, trs-filer, cloud-components / cloud-registry-ui) have a gate with the same meaning but five implementations: a bash loop with a list of skippable jobs (foca), jq with an event rule (cloud-registry, proTES), flags per job in env (trs-filer), and strict jq (cloud-components, cloud-registry-ui).
Design
- Inputs:
needs:${{ toJSON(needs) }};allow-skipped: space-separated job IDs that may be skipped, computed by the caller. Examples:${{ github.event_name == 'pull_request' && 'push publish' || '' }}; for trs-filer,pinsunless the run is for a tag, andpublishunless it is a push todev.
- Fails when there are no results, when any needed job failed or was cancelled, or when a job not listed in
allow-skippedwas skipped. Lists the offending jobs in the log and the step summary. - Tests in the
.githubCI with input matrices (all success; one failure; one cancel; allowed skip; unexpected skip; emptyneeds).
What stays per repo
The passed job (name: CI passed, if: always(), the needs: list, permissions: {}), so the required check keeps its name and no ruleset change is needed. A reusable workflow is not an option, because its check would be named CI passed / ….
Rollout
After a release of .github, each repo replaces its gate step with uses: elixir-cloud-aai/.github/actions/gate@<sha> # vX.Y.Z. That work is tracked in each repo.
Part of the parent issue on sharing workflow steps as composite actions.
Activity
fix(gate): drop expression from input description
fix(gate): read allowed skips from all lines