fix(ci): add packages:write permission for container registry push
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 3m17s

The GITHUB_TOKEN auto-generated by Forgejo Actions requires explicit
packages:write scope to authenticate with the Forgejo container registry.
Without this, docker/login-action fails with a 401/403, which caused all
builds to fail within ~30 seconds at the login step.

Also adds contents:read as a best-practice minimal-privilege declaration.
This commit is contained in:
PeterChrz 2026-03-31 22:53:55 -04:00
parent 65cafdc436
commit db267ddb8e
Signed by untrusted user who does not match committer: pch
GPG key ID: 8F0826ECF7302C63

View file

@ -9,6 +9,9 @@ on:
jobs: jobs:
build-and-push: build-and-push:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4