ci: authenticate the checkout with the job token
CI/CD Pipeline / test (push) Successful in 7s
CI/CD Pipeline / build-push-deploy (push) Successful in 26s

This commit is contained in:
kaliouich committed 2026-10-26 09:08:36 +00:00
1 parent 390f72e53a
commit a865553eae
1 file changed
+6 -2
+6 -2
View File
@@ -14,8 +14,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
env:
TOKEN: ${{ github.token }}
run: | 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 }}" git -C src checkout -q "${{ github.sha }}"
- name: Install dependencies and check the API - name: Install dependencies and check the API
working-directory: src/api working-directory: src/api
@@ -26,9 +28,11 @@ jobs:
needs: test needs: test
steps: steps:
- name: Build images with Kaniko - name: Build images with Kaniko
env:
TOKEN: ${{ github.token }}
run: | run: |
set -eu 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 }}" git -C src checkout -q "${{ github.sha }}"
export SHA="${{ github.sha }}" RUN_ID="${{ github.run_id }}" export SHA="${{ github.sha }}" RUN_ID="${{ github.run_id }}"
for pair in tamagotchi-api:api tamagotchi-frontend:frontend; do for pair in tamagotchi-api:api tamagotchi-frontend:frontend; do