From 08f709ce5cc5e428e0c3e6870f68e7814b75dd31 Mon Sep 17 00:00:00 2001 From: TapTap Date: Fri, 13 Nov 2026 14:57:59 +0000 Subject: [PATCH] ci: probe credentials after checkout --- .gitea/workflows/registry-check.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/registry-check.yaml b/.gitea/workflows/registry-check.yaml index bfb4864..716dd7c 100644 --- a/.gitea/workflows/registry-check.yaml +++ b/.gitea/workflows/registry-check.yaml @@ -9,22 +9,19 @@ jobs: container: image: gitea.tap-tap.win/taptap/audiomanager-ci:2 steps: - - name: Push trivial image to existing package + - uses: actions/checkout@v4 + - name: Push trivial image after checkout env: TOKEN: ${{ secrets.AUDIOMANAGER_REGISTRY_TOKEN }} run: | set -euo pipefail printf '%s' "$TOKEN" | docker login gitea.tap-tap.win -u "${{ gitea.actor }}" --password-stdin - BEARER=$(curl -fsS -u "${{ gitea.actor }}:$TOKEN" \ - 'https://gitea.tap-tap.win/v2/token?service=container_registry&scope=repository:taptap/audiomanager:pull,push' \ - | python3 -c 'import json,sys;d=json.load(sys.stdin);print(d.get("token") or d.get("access_token"))') - echo "bearer_len=${#BEARER}" - printf '%s' "$BEARER" | cut -d. -f2 | tr '_-' '/+' | base64 -d 2>/dev/null || true - echo mkdir -p /tmp/ctx /kaniko/.docker printf 'FROM alpine:3.20\n' > /tmp/ctx/Dockerfile cp "$HOME/.docker/config.json" /kaniko/.docker/config.json + ls -l /kaniko/.docker/config.json kaniko-executor \ --context=dir:///tmp/ctx \ --dockerfile=/tmp/ctx/Dockerfile \ - --destination=gitea.tap-tap.win/taptap/audiomanager:ci-check2 + --snapshot-mode=redo \ + --destination=gitea.tap-tap.win/taptap/audiomanager:ci-check3