WIP: Speed up container builds, releases and scans #222

Draft
Exikle wants to merge 2 commits from fix/container-ci into main
Owner

Queue an independent release for each changed image, and skip superseded releases before publishing. Dogear's Go and web stages share the source checkout and use persistent build caches. The scanner reuses the current Grype database and scans two images concurrently.

The release and scan workflows pin the shared workflow commit on the fix/container-ci branch of Exikle/forgejo-workflows. That commit must remain reachable when merging this change.

Local verification covered workflow lint, release selection, stale commits, scanner exit codes, and Dogear builds for amd64 and arm64. The live benchmark compares cache-only builds on the Forgejo builder.

Queue an independent release for each changed image, and skip superseded releases before publishing. Dogear's Go and web stages share the source checkout and use persistent build caches. The scanner reuses the current Grype database and scans two images concurrently. The release and scan workflows pin the shared workflow commit on the fix/container-ci branch of Exikle/forgejo-workflows. That commit must remain reachable when merging this change. Local verification covered workflow lint, release selection, stale commits, scanner exit codes, and Dogear builds for amd64 and arm64. The live benchmark compares cache-only builds on the Forgejo builder.
feat(ci): queue releases per image and speed up Dogear builds
Some checks failed
Validate Pull Request / validate (pull_request) Has been cancelled
Validate Pull Request / Prepare (pull_request) Has been cancelled
Validate Pull Request / Lint (pull_request) Has been cancelled
Validate Pull Request / Build and test - Success (pull_request) Has been cancelled
7ce4afb44d
fix(ci): remove ignored Forgejo permissions declarations
All checks were successful
Validate Pull Request / Prepare (pull_request) Successful in 35s
Validate Pull Request / Lint (pull_request) Successful in 1m5s
Kritika / Review kritika: confidence 4/5, no findings
Validate Pull Request / Build and test dogear (dogear) (pull_request) Successful in 4m35s
Build and test - Success Container build and test
Validate Pull Request / Build and test - Success (pull_request) Successful in 23s
Validate Pull Request / validate (pull_request) Successful in 0s
d404931825
Collaborator

Re-runViewConfidence Score: 4/5

[High risk] Releases pin forgejo-workflows commit 461666f on the fix/container-ci branch, and nothing shows that commit will stay reachable; high risk because the release pipeline is rebuilt.

Summary

Moves releases to one queued dispatch per changed app, and speeds up Dogear builds and scans

  • Pushes to main under apps/** now go through queue-releases.yaml, which dispatches release.yaml once per app with source-sha. Release runs are queued per app in container-release-<app>.
  • At shared workflow 461666f, container-release.yaml skips a release when a newer main commit touched apps/<app> or include/.dockerignore. It also refuses any source-sha that is not on the default branch.
  • After merging, a push that touches two apps should start two runs, titled Release <app>.

What's good

  • The shared build checks that source-sha is a 40-character hex commit on the default branch before it checks it out.
  • queue-releases.yaml gives each push its own concurrency group (enqueue-<sha>), so no push's enqueue is cancelled.
  • The Dogear source stage is now shared by the Go and web stages, so the repository is cloned once.
Review context · 1 source · 0/4 commands

Reviews (1) · Last reviewed commit: "fix(ci): remove ignored Forgejo permissi..." · cliproxy/claude-opus-5-5

<!-- kritika:pr-222 --> ## <a href="https://kritika.dcunha.io/#/a/forgejo/exikle/pulls/Exikle/containers/222"><picture><source media="(prefers-color-scheme: dark)" srcset="https://kritika.dcunha.io/badges/rerun-dark.svg"><img alt="Re-run" src="https://kritika.dcunha.io/badges/rerun.svg" align="right"></picture></a><a href="https://kritika.dcunha.io/#/a/forgejo/exikle/pulls/Exikle/containers/222"><picture><source media="(prefers-color-scheme: dark)" srcset="https://kritika.dcunha.io/badges/view-dark.svg"><img alt="View" src="https://kritika.dcunha.io/badges/view.svg" align="right"></picture></a>Confidence Score: 4/5 **[High risk]** Releases pin forgejo-workflows commit 461666f on the fix/container-ci branch, and nothing shows that commit will stay reachable; high risk because the release pipeline is rebuilt. ### Summary Moves releases to one queued dispatch per changed app, and speeds up Dogear builds and scans - Pushes to `main` under `apps/**` now go through `queue-releases.yaml`, which dispatches `release.yaml` once per app with `source-sha`. Release runs are queued per app in `container-release-<app>`. - At shared workflow 461666f, `container-release.yaml` skips a release when a newer `main` commit touched `apps/<app>` or `include/.dockerignore`. It also refuses any `source-sha` that is not on the default branch. - After merging, a push that touches two apps should start two runs, titled `Release <app>`. **What's good** - The shared build checks that `source-sha` is a 40-character hex commit on the default branch before it checks it out. - `queue-releases.yaml` gives each push its own concurrency group (`enqueue-<sha>`), so no push's enqueue is cancelled. - The Dogear `source` stage is now shared by the Go and web stages, so the repository is cloned once. <details> <summary>Review context · 1 source · 0/4 commands</summary> - **Sources:** - <https://git.dcunha.io/Exikle/forgejo-workflows> - **Commands run:** none </details> <sub>Reviews (1) · Last reviewed commit: ["fix(ci): remove ignored Forgejo permissi..."](https://git.dcunha.io/Exikle/containers/commit/d404931825b862ac5f74e60e5e58de91e0235fac) · cliproxy/claude-opus-5-5</sub>
All checks were successful
Validate Pull Request / Prepare (pull_request) Successful in 35s
Validate Pull Request / Lint (pull_request) Successful in 1m5s
Required
Details
Kritika / Review kritika: confidence 4/5, no findings
Validate Pull Request / Build and test dogear (dogear) (pull_request) Successful in 4m35s
Build and test - Success Container build and test
Validate Pull Request / Build and test - Success (pull_request) Successful in 23s
Required
Details
Validate Pull Request / validate (pull_request) Successful in 0s
This pull request has changes conflicting with the target branch.
  • .forgejo/workflows/release.yaml
  • .forgejo/workflows/vulnerability-scan.yaml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'fix/container-ci:fix/container-ci'
git switch 'fix/container-ci'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Exikle/containers!222
No description provided.