Skip to content

ci: add release and scan workflows - #214

Draft
uniqueg wants to merge 7 commits into
devfrom
issue-116-release-workflows
Draft

uniqueg wants to merge 7 commits into
devfrom
issue-116-release-workflows

Conversation

@uniqueg

@uniqueg uniqueg commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Closes #116

Summary

Adds the release workflows of proWES on the org's release pattern, modelled on tes-authz's release.yml and using the shared actions of elixir-cloud-aai/.github (v1.3.0):

  • release.yml / Release, on version tags v*:
    • prepare (Prepare release): check-release (signed, verified annotated tag; commit on main; CI passed for its push to dev; CITATION.cff version and date), publish-release with check-only (curated notes docs/releases/<version>.md, no published release yet), the version form (X.Y.Z, X.Y.ZaN, X.Y.ZbN, X.Y.ZrcN, as setuptools-scm reports it) and its SemVer chart version, scripts/check_release_pins.py, then packages the chart (scripts/chart_readme.py pins the README links to the release).
    • push (Push release image): image by digest with SBOM and provenance, refuses an existing X.Y.Z tag, checks the app reports the version.
    • scan (Scan release image): Trivy on that digest, no credentials, fail-on-pip.
    • release-image (Release image): attest, sign (cosign keyless), tag X.Y.Z. No latest (as tes-authz).
    • release-chart (Release chart): checks the chart artifact by name and SHA-256, refuses a published chart version, helm push to oci://ghcr.io/<owner, lowercased>/charts, attests and signs it in GHCR and as a file (Sigstore bundle).
    • notify (Notify Pubgrade): as proTES, only with PUBGRADE_URL and PUBGRADE_REPOSITORY_ID set.
    • publish (Publish release): publish-release with the chart and its bundle as assets; prerelease until 1.0.
    • push, release-image, release-chart and notify run in the environment release.
  • scan.yml / Scan: weekly scan of the image of the highest published release (PEP 440 order, pre-releases included); skipped before the first release.
  • ci.yml: the readiness job (Release readiness) now checks the curated notes with publish-release's checker at the pinned commit, plus scripts/check_action_pins.py and scripts/check_release_pins.py, while CITATION.cff names an untagged version (warnings on PRs and forks, errors on pushes). It is in the gate's needs and in publish's.
  • Scripts: adds scripts/check_action_pins.py (from tes-authz) with tests; removes citation.py, release_notes.py, release_assets.py and release_version.py (replaced by the shared actions) with their tests.
  • Docs: docs/development.md "Versioning and releases" (release-prep PR with CITATION.cff and notes, tag commands in a worktree, the jobs, re-runs, post-release DOI PR, settings, Pubgrade, forks), docs/operations.md (verifying the chart in GHCR and as a file), docs/deployment.md (install from oci://ghcr.io/elixir-cloud-aai/charts/prowes), docs/upgrading.md (latest is no longer updated), docs/changelog.md.

Decisions taken here (Claude's proposal, from the plan for #116): no latest tag for releases (as tes-authz; the legacy latest image stays as it is); the chart goes both to GHCR (as the issue asks) and onto the GitHub release.

Full review lane (release workflow).

How it was verified

  • uv run coverage run -m pytest && uv run coverage report: RESULT_TESTS
  • uv run pre-commit run --all-files (ruff, mypy, semgrep, ast-grep, actionlint with shellcheck 0.11.0, uv lock): passed
  • uv run --extra docs mkdocs build --strict: RESULT_DOCS
  • tests/test_release_workflows.py runs the scripts of the steps (chart version, chart checks, chart repository, chart version check, image tag checks, highest-release lookup) with stand-ins for gh, docker and helm.
  • CI: RESULT_CI
  • Not run: the release workflow itself. A fork dry run on a test tag is the open "Done when" item of ci: add release and scan workflows #116 and is planned before the first release (needs the fork's DOCKERHUB_ORG, Docker Hub secrets and release environment).

Declined review findings

RESULT_DECLINED

Open questions

None.

Merge gate: maintainer review; the fork dry run follows before the first tag.

🤖 Generated with Claude Code

Summary by Sourcery

Automate versioned releases of proWES images and Helm charts, with release readiness checks and ongoing scans.

New Features:

  • Add automated releases from signed version tags, publishing scanned and signed container images plus Helm charts to GHCR and GitHub Releases.
  • Add weekly vulnerability scans for the highest published release, including pre-releases, and optional Pubgrade notifications.
  • Add release-readiness checks to CI for curated release notes and dependency and shared-action pins.

Enhancements:

  • Align CI and release checks with the shared organization release actions and require release readiness in the CI gate.

Build:

  • Include scripts in mypy and coverage checks, maintaining the 100% coverage threshold.

CI:

  • Add release and scheduled-scan GitHub Actions workflows and expand CI workflow tests.

Documentation:

  • Document version preparation and release operations, chart installation and verification, scheduled scans, and the fact that the legacy latest image tag is no longer updated.

Tests:

  • Add coverage for release workflows, release pin checks, chart README versioning, and shared-action pin checks.

Chores:

  • Remove the legacy citation and release helper scripts and their tests, replacing their responsibilities with shared release actions.

uniqueg and others added 6 commits December 4, 2026 04:04
Add the release scripts of the org's FOCA apps (as in DRS-Filer and
proTES): version and chart version from the tag, citation metadata,
release pins, chart README links, release notes and release assets,
with their tests. Check `scripts/` with mypy and count it in the
coverage, as in DRS-Filer.

Refs #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Add release.yml (Release) and scan.yml (Scan) following the org's
release pattern: prepare checks the signed tag, the commit on main,
CI, citation metadata, pins and notes and packages the chart; the
image is pushed by digest, scanned, then attested, signed and
tagged; the GitHub release (prerelease until 1.0) gets the chart, its
Sigstore bundle and the curated plus generated notes. Add the CI job
Release readiness to the gate, and leave CI values out of the
packaged chart.

Refs #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Document the release steps, the workflows' checks, the repository
settings they rely on, how to verify release images and charts, and
how to install a released chart.

Closes #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Add scripts/check_action_pins.py (from tes-authz), which checks that
every action of elixir-cloud-aai/.github is pinned to the commit of the
release its comment names, with its tests.

Refs #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rework release.yml on the org's release pattern, as in tes-authz:
check-release and publish-release check the tag, the commit, the
citation metadata and the curated notes (prepare); the image is pushed
by digest, scanned, then attested, signed and tagged X.Y.Z (no latest)
in release-image; release-chart pushes the chart to
oci://ghcr.io/<owner>/charts and signs it; notify registers the image
at Pubgrade; publish creates the GitHub release with the chart and its
Sigstore bundle attached.

scan.yml scans the image of the highest published release. The CI job
Release readiness checks the notes with publish-release's checker and
the pins of shared actions and dependencies. The release scripts that
the shared actions replace (citation.py, release_notes.py,
release_assets.py, release_version.py) go, with their tests.

Refs #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe the release steps (release-prep PR with CITATION.cff and
curated notes, tag commands, post-release DOI PR), the jobs of the
release workflow, the chart in GHCR, the end of the latest tag and the
verification of released charts.

Refs #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Implementation

Add the chart README rewriter and release-pin checker that validate release inputs and prepare chart links for the tagged version.

  • scripts/chart_readme.py L1-168
  • scripts/check_release_pins.py L1-484

Add the shared-action pin checker so releases use organization actions at the commits of their named releases.

  • scripts/check_action_pins.py L1-218

Configuration

Add tag-triggered image and chart release jobs, a weekly scan of the highest published release, and CI release-readiness checks that gate publishing.

  • .github/workflows/ci.yml L4-8, L450-568 (+5 small edits)
  • .github/workflows/release.yml L1-654
  • .github/workflows/scan.yml L1-98

Exclude CI-only files from packaged charts and clarify that release preparation sets the packaged chart version and app version.

  • deployment/.helmignore L23-25
  • deployment/Chart.yaml L7-8

Include the new release scripts in type checking and coverage, with an exclusion for their directly tested entry points.

  • pyproject.toml L56, L79-86

Documentation

Document release preparation and publishing, workflow checks, chart distribution, scanning, verification, and the operational settings required for releases.

  • docs/changelog.md L4-9
  • docs/deployment.md L82-96, L250-251
  • docs/development.md L520-823 (+3 small edits)
  • docs/operations.md L137-185, L198-199, L208-258
  • docs/upgrading.md L385-396
  • mkdocs.yml L88-91

Tests

Add tests for release workflow structure and behavior, including readiness checks, chart packaging and publication, image digest handling, Pubgrade notification, and scheduled release selection.

  • tests/test_release_workflows.py L1-1291
  • tests/test_workflows.py L5-9, L75-86, L139-167

Test the chart README rewriting and the checks that prevent unreleased dependency and shared-action pins.

  • tests/test_chart_readme.py L1-263
  • tests/test_check_action_pins.py L1-250
  • tests/test_check_release_pins.py L1-942

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

📖 5 files modified


Preview · build overview · proWES · built Dec. 4, 2026, 4:41 p.m. UTC

@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e042e80) to head (c74dda1).

Additional details and impacted files
@@            Coverage Diff             @@
##               dev      #214    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           22        26     +4     
  Lines         1451      1806   +355     
==========================================
+ Hits          1451      1806   +355     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Run the scripts of CI's Release readiness job (release in preparation,
checker pin, levels, notes and pin checks) and of the release steps
that check digests, read the chart's digest from helm push, check the
app version and tag the image, with stand-ins for git, python, docker
and helm. Fix the comment on latest in ci.yml and say how the
Changelog entry becomes a section with the first release notes.

Refs #116

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: add release and scan workflows

1 participant