fix(ci): checkout 改用 gitea.* 表达式传参(runner 未注入 GITEA_* 默认环境变量)
This commit is contained in:
@@ -16,10 +16,13 @@ jobs:
|
||||
steps:
|
||||
# 精简 runner(Alpine)无 node,无法跑 action-checkout;直接用 git 浅克隆
|
||||
- name: Checkout
|
||||
env:
|
||||
REPO_URL: ${{ gitea.server_url }}/${{ gitea.repository }}
|
||||
REF_NAME: ${{ gitea.ref_name }}
|
||||
run: |
|
||||
git init -q .
|
||||
git remote add origin "$GITEA_SERVER_URL/$GITEA_REPOSITORY"
|
||||
git fetch -q --depth 20 origin "$GITEA_REF_NAME"
|
||||
git remote add origin "$REPO_URL"
|
||||
git fetch -q --depth 20 origin "$REF_NAME"
|
||||
git checkout -q FETCH_HEAD
|
||||
git log --oneline -3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user