Skip to content

Harden release workflow: packages:write, fetch-depth:0, ghcr.io login#59

Merged
tamalsaha merged 1 commit into
masterfrom
pin-actions-to-sha
May 21, 2026
Merged

Harden release workflow: packages:write, fetch-depth:0, ghcr.io login#59
tamalsaha merged 1 commit into
masterfrom
pin-actions-to-sha

Conversation

@tamalsaha

Copy link
Copy Markdown
Member

Summary

  • Add permissions: packages: write on the build job so the workflow's GITHUB_TOKEN can push images to the org's ghcr.io packages.
  • Add with: fetch-depth: 0 to the actions/checkout step so the full git history is available (e.g. for git describe in make version).
  • Switch container-registry login to ghcr.io with ${{ github.actor }} / ${{ secrets.GITHUB_TOKEN }} via docker/login-action (replacing 1gtm / DOCKERHUB_TOKEN, and any inline docker login shell command).

Required follow-up before next release

On the ghcr.io package settings page (Org → Packages → <this image> → Package settings → Manage Actions access), add this repo with role Write (or Admin). Without that, GITHUB_TOKEN will hit permission_denied: write_package on push.

Test plan

  • CI passes on this PR.
  • Next tag-triggered release publishes successfully to ghcr.io/kubedb/<image>.

🤖 Generated with Claude Code

- Add `permissions: packages: write` to the build job so the workflow's
  GITHUB_TOKEN can push to ghcr.io.
- Add `fetch-depth: 0` to the actions/checkout step so the full history
  is available for version derivation (e.g. `git describe`).
- Switch container-registry login to ghcr.io with `github.actor` /
  `GITHUB_TOKEN` via docker/login-action (replacing prior 1gtm /
  DOCKERHUB_TOKEN, and any inline `docker login` shell command).

Signed-off-by: Tamal Saha <tamal@appscode.com>
@tamalsaha tamalsaha merged commit d694f40 into master May 21, 2026
4 checks passed
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.

1 participant