Skip to content

ci: share workflow steps as composite actions #11

Closed
16 of 16 issues completed
Closed

Description

@uniqueg

Summary

Repos in the org copy the same CI steps, and the copies drift: PR-title checks, image scans and CI gates. This issue moves shared steps into composite actions in elixir-cloud-aai/.github under actions/<name>/. Each repo calls them from its own thin workflows.

Approach: composite actions, called from thin workflows in each repo

A composite action runs as steps inside the caller's job. So these stay with each repo:

  • check names: the job keeps its own name, e.g. CI passed or PR title, so required checks and rulesets don't change;
  • environments, approvals, secrets and permissions;
  • trusted-publishing and signing identities: the OIDC token, the PyPI and npm trusted publishers and the cosign certificate identity still name the repo's own workflow.

Callers pin uses: elixir-cloud-aai/.github/actions/<name>@<40-char sha> # vX.Y.Z.

Why not reusable workflows

A reusable workflow (workflow_call) runs as a whole job of the called workflow, and that causes these problems:

  • Check names become <caller job> / <called job>. So a shared gate could never be called exactly CI passed, and every ruleset would need a switch. Also, if the caller job is skipped (for example, for Dependabot), a required nested check waits forever.
  • PyPI trusted publishing: "Reusable workflows cannot currently be used as the workflow in a Trusted Publisher" (PyPI troubleshooting, pypi/warehouse#11096, still open).
  • npm trusted publishing checks the name of the calling workflow file, not the workflow that contains the publish command, and needs id-token: write in both (npm trusted publishers). That is possible, but brittle.
  • Cosign keyless signing and attestations: the certificate identity and the attestation signer would be the .github workflow (job_workflow_ref) instead of the repo's release.yml (OIDC with reusable workflows). That breaks the documented cosign verify --certificate-identity … and gh attestation verify --signer-workflow … commands, for example in cloud-registry's docs/operations.md and foca's docs/deployment.md.

The ruleset rule "Require workflows to pass before merging" is not a fit either: it only runs on the default pull_request activity types and ignores filters, so there is no edited trigger (available rules for rulesets).

More sources:

Versioning of .github

  • Signed, annotated semver tags vMAJOR.MINOR.PATCH, and GitHub releases with immutable releases on. No moving major tags.
  • Callers pin @<sha> # vX.Y.Z. Dependabot in each caller (github-actions ecosystem) bumps the SHA and the version comment, which only works with exact semver tags.
  • Breaking changes go only in a major version, and the release notes say what callers have to change.
  • A change in .github reaches a repo only when that repo merges its Dependabot bump. This limits the impact of a bad release: each repo can review the bump and revert it.

Prerequisite: CI for .github

The .github repo first needs its own CI: actionlint, tests for each action, a CI passed gate, a ruleset that requires the gate, Dependabot with directories covering each actions/* folder, and the tag and release process. That is #12; the other children are blocked by it.

What stays in each repo

  • Release, publish and sign jobs: PyPI, npm, image push, cosign and attestations, GitHub release creation, chart publishing. Shared composite steps inside these jobs are fine; shared jobs are not.
  • dependabot.yml: GitHub has no org-level mechanism for version updates.
  • Repo-specific tests and deploys: foca's chart actions, smoke tests, wheel checks, end-to-end tests, Vercel deploys.
  • Triggers, concurrency, permissions, environments, secrets, matrices, and the gate job with its needs: list.

Children

Each child covers the action in .github, with its tests and docs. Each repo tracks its own switch to the shared action.

Later candidates (not in this issue)

  • Release scripts: make release_version.py, release_assets.py, release_notes.py, citation.py and check_release_pins.py the same across cloud-registry, proTES, trs-filer and foca, then share them.
  • GitHub release steps: a composite action for "draft → upload assets → publish", with the jobs staying in each repo's release.yml. Dry-run in a fork before the first release that uses it.
  • Image publishing steps: "push by digest → scan → attest → cosign → tag → verify digest" as composite steps (foca, cloud-registry, proTES; trs-filer once it adopts the pattern).
  • Workflow templates for scan.yml (the weekly scan) and a ci.yml skeleton with the gate.
  • CodeQL: default setup org-wide through a code security configuration, instead of a shared workflow. cloud-components, cloud-registry-ui and .github don't have it yet.

Sub-issues

Sub-issues

16 of 16 Issues completed
Loading 16 sub-issues

Activity

  1. added
    priority: medium
    status: triage
    type flag: meta
    type: ci / cd
    workload: weeks
    on Oct 27, 2026
  2. added
    workload: days
    and removed
    workload: weeks
    on Oct 27, 2026
  3. removed
    status: triage
    on Oct 30, 2026
  4. uniqueg commented on Oct 30, 2026

    @uniqueg
    MemberAuthor

    All sub-issues are done: the .github CI and release process (#12, #24, #26), the shared PR title, scan-image and gate actions (#13-#15, #17), and their adoption in foca, cloud-registry, proTES, trs-filer, cloud-components and cloud-registry-ui.

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

    priority: mediumtype flag: metatype: ci / cdworkload: days

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions