修复Gitea内网检出超时
发布 Nacos 配置 / publish (push) Successful in 35s

This commit is contained in:
2026-08-28 15:08:01 +08:00
parent b0181edbd3
commit c50695d249
4 changed files with 33 additions and 9 deletions
+14 -4
View File
@@ -16,15 +16,25 @@ jobs:
deploy:
runs-on: jayucloud
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
WEB_TARGET_HOST: ${{ secrets.SALON_PROD_WEB_HOST }}
WEB_TARGET_PORT: ${{ secrets.SALON_PROD_WEB_PORT }}
WEB_TARGET_USER: ${{ secrets.SALON_PROD_WEB_USER }}
WEB_REMOTE_DIR: ${{ secrets.SALON_PROD_WEB_DIR }}
steps:
- name: 检出发布脚本
uses: actions/checkout@v4
with:
ref: ${{ inputs.release_sha }}
- name: 从内网 Gitea 检出发布脚本
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHECKOUT_SHA: ${{ inputs.release_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: 发布并校验 Salon 生产 Nacos
shell: bash
env:
+14 -5
View File
@@ -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: |