ci: authenticate registry with REGISTRY_TOKEN secret
build-and-push / build (push) Canceled after 55s

Use an explicit Gitea token (write:package scope) instead of the
built-in job token for docker login.
This commit is contained in:
ahp
2026-10-18 19:17:14 +03:30
parent 994879749b
commit 77748bcba2
+4 -3
View File
@@ -4,8 +4,9 @@ name: build-and-push
# Gitea container registry. Argo CD then rolls them out via # Gitea container registry. Argo CD then rolls them out via
# deploy/helm/pargar (values-apollo.yaml pins the matching image tags). # deploy/helm/pargar (values-apollo.yaml pins the matching image tags).
# #
# Requires a registered Gitea Actions runner and `permissions.packages: write` # Requires a registered Gitea Actions runner, a `REGISTRY_TOKEN` secret
# so the built-in job token (secrets.GITEA_TOKEN) can push to the registry. # (Gitea access token with write:package scope) so docker login can push to
# the registry.
on: on:
push: push:
@@ -56,7 +57,7 @@ jobs:
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITEA_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push backend - name: Build and push backend
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6