ci: authenticate the checkout with the job token
This commit is contained in:
1 parent
390f72e53a
commit
a865553eae
1 file changed
+6
-2
@@ -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
|
||||
|
||||
Reference in new issue
Block a user