fix: use REGISTRY_PAT secret for git auth (exists on all repos)
This commit is contained in:
@@ -32,9 +32,9 @@ jobs:
|
|||||||
# path to trust in the first place.
|
# path to trust in the first place.
|
||||||
- name: checkout
|
- name: checkout
|
||||||
env:
|
env:
|
||||||
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
REGISTRY_PAT: ${{ secrets.REGISTRY_PAT }}
|
||||||
run: |
|
run: |
|
||||||
url=$(echo "${GITHUB_SERVER_URL}" | sed -E "s#(https?://)#\1x-access-token:${GIT_TOKEN}@#")
|
url=$(echo "${GITHUB_SERVER_URL}" | sed -E "s#(https?://)#\1x-access-token:${REGISTRY_PAT}@#")
|
||||||
git clone "${url}/${GITHUB_REPOSITORY}.git" .
|
git clone "${url}/${GITHUB_REPOSITORY}.git" .
|
||||||
git checkout "${GITHUB_SHA}"
|
git checkout "${GITHUB_SHA}"
|
||||||
|
|
||||||
@@ -53,9 +53,9 @@ jobs:
|
|||||||
# Same reason as the buf job: golang:1.25 has no Node.js either.
|
# Same reason as the buf job: golang:1.25 has no Node.js either.
|
||||||
- name: checkout
|
- name: checkout
|
||||||
env:
|
env:
|
||||||
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
REGISTRY_PAT: ${{ secrets.REGISTRY_PAT }}
|
||||||
run: |
|
run: |
|
||||||
url=$(echo "${GITHUB_SERVER_URL}" | sed -E "s#(https?://)#\1x-access-token:${GIT_TOKEN}@#")
|
url=$(echo "${GITHUB_SERVER_URL}" | sed -E "s#(https?://)#\1x-access-token:${REGISTRY_PAT}@#")
|
||||||
git clone "${url}/${GITHUB_REPOSITORY}.git" .
|
git clone "${url}/${GITHUB_REPOSITORY}.git" .
|
||||||
git checkout "${GITHUB_SHA}"
|
git checkout "${GITHUB_SHA}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user