Skip to content

feat: reusable action to notify Pubgrade from CI #88

Closed

Description

@uniqueg

Why?

Repositories that publish images notify Pubgrade from their release workflows with their own inline steps (e.g. tesk-api's notify job, elixir-cloud-aai/tesk-api#120). Every repo that wants to use Pubgrade has to copy and maintain that step. A packaged, versioned action makes adopting Pubgrade a few lines of YAML, for our repos and for others.

How?

A composite action in its own repository, e.g. elixir-cloud-aai/pubgrade-notify-action, rather than a reusable workflow:

  • It runs as a step inside the caller's release job, right after the image push. The caller keeps its own environment: release (approval, secrets, variables) and has the image digest at hand. A reusable workflow would run as a separate job, declare the environment itself and need secrets: inherit.
  • Its own repository puts action.yml at the root, which the GitHub Marketplace requires (one action per repository), and versions the action independently of Pubgrade releases. The alternative, Pubgrade/actions/notify/, keeps API and client in one PR but can't be listed on the Marketplace.

Interface (action.yml):

inputs:   url, repository-id, token        (required)
          image          e.g. elixircloud/tesk-api@sha256:…  (digest preferred)
          build-type     optional (build types, #7)
          fail-on-error  default true
outputs:  build-id

The action posts to <url>/repositories/<id>/builds, masks the token, retries briefly on 5xx and fails with a clear message when a required input is missing. It has no if: of its own: callers switch it on, e.g. with if: vars.PUBGRADE_URL != '' as in elixir-cloud-aai/tesk-api#120.

Caller:

- uses: elixir-cloud-aai/pubgrade-notify-action@<sha> # v1.0.0
  with:
    url: ${{ vars.PUBGRADE_URL }}
    repository-id: ${{ vars.PUBGRADE_REPOSITORY_ID }}
    token: ${{ secrets.PUBGRADE_TOKEN }}
    image: ${{ steps.push.outputs.image }}@${{ steps.push.outputs.digest }}

Versioning and publishing:

  • Release tags are immutable under the org's tag rulesets, so there is no moving v1 tag: callers pin the commit SHA with a version comment (and Dependabot updates it).
  • Semver tags with GitHub releases, prereleases until 1.0.0; Marketplace listing from 1.0.0.
  • CI with the standard CI passed gate, plus an integration job that starts Pubgrade from its image and registers a real build.

Steps

  • Create the action repository, aligned with the org (CI, rulesets, community files, docs).
  • Implement the action with tests (unit + integration against a Pubgrade container).
  • Docs: a "Notify Pubgrade from CI" page in Pubgrade's docs (docs/usage.md), linking the action.
    Adoption (needs a Pubgrade release with the action, so it is tracked separately): tesk-api in ci: notify Pubgrade with the notify action tesk-api#157; other image-publishing repos (FOCA apps, TESK suite) can follow the same pattern, each behind its own PUBGRADE_URL gate.

Acceptance criteria

  • The action (actions/notify/, per the decision below) is implemented, tested (unit + integration against Pubgrade) and documented.

Scope note (2026-11-13): per the decision in the comments, the action lives in this repository under actions/notify/. Releasing it and switching tesk-api over moved to elixir-cloud-aai/tesk-api#157, so that one PR can close this issue.

Activity

  1. added
    priority: medium
    status: triage
    type: ci / cd
    workload: days
    ecp-wp4: M4.3
    and removed on Nov 8, 2026
  2. uniqueg commented on Nov 12, 2026

    @uniqueg
    MemberAuthor

    Decided: the notify action lives in this repository, under actions/notify/, not in a separate repository. It is versioned with Pubgrade and referenced as elixir-cloud-aai/Pubgrade/actions/notify@<ref>.

  3. added
    status: in progress
    and removed
    status: triage
    on Nov 13, 2026
  4. self-assigned this
    on Nov 13, 2026
  5. moved this from In review to In progress in ELIXIR On-Cloudon Nov 13, 2026
  6. moved this to In review in ELIXIR On-Cloudon Nov 13, 2026
  7. moved this from In progress to Done in ELIXIR On-Cloudon Nov 13, 2026
  8. removed
    status: in progress
    on Nov 13, 2026
  9. added this to the v0.3.0 milestone on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ecp-wp4: M4.3priority: mediumtype: ci / cdworkload: days

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions