From 01471b40dacfd8aeb449a255e993187444eab0f1 Mon Sep 17 00:00:00 2001 From: Tri Vo Khac Date: Sat, 14 Nov 2026 02:38:05 +0700 Subject: [PATCH] ci: push the CI image with a package token --- .gitea/workflows/ci-image.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci-image.yml b/.gitea/workflows/ci-image.yml index 05a82cb..8d2aa42 100644 --- a/.gitea/workflows/ci-image.yml +++ b/.gitea/workflows/ci-image.yml @@ -10,10 +10,6 @@ on: - cron: '0 3 * * 1' workflow_dispatch: -permissions: - contents: read - packages: write - jobs: image: # The build runs on the runner's own Docker daemon, so the amd64 runner has the new @@ -26,6 +22,10 @@ jobs: - name: Build run: docker build --pull -t "$IMAGE" .gitea/ci-image - name: Push + # Gitea's Actions token cannot push to the container registry, so this uses an + # access token with the write:package scope. + env: + TOKEN: ${{ secrets.PACKAGES_TOKEN }} run: | - echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.trivk.dev -u "${{ github.actor }}" --password-stdin + echo "$TOKEN" | docker login git.trivk.dev -u "${{ github.repository_owner }}" --password-stdin docker push "$IMAGE"