@@ -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:
|
||||
|
||||
@@ -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