ci: authenticate production checkout
This commit is contained in:
@@ -19,8 +19,14 @@ jobs:
|
||||
steps:
|
||||
- name: 检出 main
|
||||
env:
|
||||
REPOSITORY_URL: http://117.72.28.96:8765/Jacky/Hulumath-Web.git
|
||||
run: git clone --branch main --single-branch "$REPOSITORY_URL" .
|
||||
CHECKOUT_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git"
|
||||
git -c http.extraHeader="Authorization: token ${CHECKOUT_TOKEN}" \
|
||||
fetch --depth=1 origin main
|
||||
git checkout --detach FETCH_HEAD
|
||||
|
||||
- name: 检查发布文件和脚本语法
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user