From a865553eae70df550baf15cab2e859d0557cff7a Mon Sep 17 00:00:00 2001 From: kaliouich Date: Mon, 26 Oct 2026 09:08:36 +0000 Subject: [PATCH] ci: authenticate the checkout with the job token --- .gitea/workflows/deploy.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 479f5fa..aa9c1a9 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -14,8 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout + env: + TOKEN: ${{ github.token }} run: | - git clone -q "http://gitea-http.gitea.svc.cluster.local:3000/${{ github.repository }}.git" src + git -c http.extraHeader="Authorization: token $TOKEN" clone -q "http://gitea-http.gitea.svc.cluster.local:3000/${{ github.repository }}.git" src git -C src checkout -q "${{ github.sha }}" - name: Install dependencies and check the API working-directory: src/api @@ -26,9 +28,11 @@ jobs: needs: test steps: - name: Build images with Kaniko + env: + TOKEN: ${{ github.token }} run: | set -eu - git clone -q "http://gitea-http.gitea.svc.cluster.local:3000/${{ github.repository }}.git" src + git -c http.extraHeader="Authorization: token $TOKEN" clone -q "http://gitea-http.gitea.svc.cluster.local:3000/${{ github.repository }}.git" src git -C src checkout -q "${{ github.sha }}" export SHA="${{ github.sha }}" RUN_ID="${{ github.run_id }}" for pair in tamagotchi-api:api tamagotchi-frontend:frontend; do