ci: push the CI image with a package token

This commit is contained in:
tri committed 2026-11-14 08:27:22 +07:00
1 parent d61e7b59aa
commit db0b44835d
1 file changed
+5 -5
+5 -5
View File
@@ -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"