fix(ci): checkout using CI_TOKEN in clone URL
This commit is contained in:
@@ -16,11 +16,11 @@ jobs:
|
|||||||
CI_TOKEN: ${{ secrets.CI_TOKEN }}
|
CI_TOKEN: ${{ secrets.CI_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
git init -q
|
git init -q
|
||||||
git remote add origin "http://10.8.0.52:8080/andrew/plagin_tokens.git"
|
git remote add origin "http://${CI_TOKEN}@10.8.0.52:8080/andrew/plagin_tokens.git"
|
||||||
if [ -n "${GITHUB_SHA:-}" ]; then
|
if [ -n "${GITHUB_SHA:-}" ]; then
|
||||||
git -c http.extraheader="Authorization: token ${CI_TOKEN}" fetch -q --depth 1 origin "${GITHUB_SHA}"
|
git fetch -q --depth 1 origin "${GITHUB_SHA}"
|
||||||
else
|
else
|
||||||
git -c http.extraheader="Authorization: token ${CI_TOKEN}" fetch -q --depth 1 origin main
|
git fetch -q --depth 1 origin main
|
||||||
fi
|
fi
|
||||||
git checkout -q FETCH_HEAD
|
git checkout -q FETCH_HEAD
|
||||||
- name: Install Bun
|
- name: Install Bun
|
||||||
|
|||||||
Reference in New Issue
Block a user