ci: stop using FORGEJO_* secret names
Forgejo reserves names starting with FORGEJO_, and since runner v13 secrets.FORGEJO_TOKEN, _USER and _REGISTRY no longer reach the job as the values set on the repository: Kaniko logged in with the wrong credentials and every image push failed with UNAUTHORIZED. The registry host and user are not secret (they are in every image name), so write them in the workflow; the token comes from FJ_TOKEN, as in datacenterbingo. Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
e382992c2e
commit
f2992d2d0e
1 changed files with 3 additions and 3 deletions
|
|
@ -42,17 +42,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# Tags
|
# Tags
|
||||||
SHORT_SHA=${GITHUB_SHA::8}
|
SHORT_SHA=${GITHUB_SHA::8}
|
||||||
IMAGE_BASE=${{ secrets.FORGEJO_REGISTRY }}/${{ secrets.FORGEJO_USER }}/blog
|
IMAGE_BASE=git.czsk.it/asxpi/blog
|
||||||
IMAGE_TAG=${IMAGE_BASE}:${SHORT_SHA}
|
IMAGE_TAG=${IMAGE_BASE}:${SHORT_SHA}
|
||||||
IMAGE_LATEST=${IMAGE_BASE}:latest
|
IMAGE_LATEST=${IMAGE_BASE}:latest
|
||||||
|
|
||||||
# Auth Conf
|
# Auth Conf
|
||||||
mkdir -p /kaniko/.docker
|
mkdir -p /kaniko/.docker
|
||||||
echo "{\"auths\":{\"${{ secrets.FORGEJO_REGISTRY }}\":{\"auth\":\"$(echo -n ${{ secrets.FORGEJO_USER }}:${{ secrets.FORGEJO_TOKEN }} | base64)\"}}}" > /kaniko/.docker/config.json
|
echo "{\"auths\":{\"git.czsk.it\":{\"auth\":\"$(echo -n asxpi:${{ secrets.FJ_TOKEN }} | base64)\"}}}" > /kaniko/.docker/config.json
|
||||||
|
|
||||||
# Build & push
|
# Build & push
|
||||||
/kaniko/executor \
|
/kaniko/executor \
|
||||||
--context=git://${{ secrets.FORGEJO_REGISTRY }}/${{ github.repository }}.git \
|
--context=git://git.czsk.it/${{ github.repository }}.git \
|
||||||
--git=branch=${{ github.ref_name }} \
|
--git=branch=${{ github.ref_name }} \
|
||||||
--destination=$IMAGE_TAG \
|
--destination=$IMAGE_TAG \
|
||||||
--destination=$IMAGE_LATEST
|
--destination=$IMAGE_LATEST
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue