@@ -16,12 +16,21 @@ jobs:
|
||||
runs-on: jayucloud
|
||||
env:
|
||||
GITHUB_REF_NAME: prod
|
||||
GITHUB_SERVER_URL: http://192.168.5.15:3000
|
||||
steps:
|
||||
- name: 检出合并提交
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
||||
fetch-depth: 0
|
||||
- name: 从内网 Gitea 检出合并提交
|
||||
shell: bash
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CHECKOUT_SHA: ${{ github.event.pull_request.merge_commit_sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
test -n "$GITEA_TOKEN"
|
||||
test -n "$CHECKOUT_SHA"
|
||||
git init .
|
||||
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
|
||||
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$CHECKOUT_SHA"
|
||||
git checkout --detach "$CHECKOUT_SHA"
|
||||
- name: 检查构建工具链
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user