mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
ci: 修复打包时可能包含自身导致递归的问题
Some checks failed
build-and-deploy / 直传代码并部署到 Host15 (push) Failing after 56s
Some checks failed
build-and-deploy / 直传代码并部署到 Host15 (push) Failing after 56s
修改打包脚本,使用临时文件进行打包操作,避免 tar 命令将生成的压缩包自身包含进去,从而防止潜在的无限递归和打包失败。
This commit is contained in:
@@ -57,12 +57,17 @@ jobs:
|
|||||||
PACKAGE_NAME: ${{ env.PACKAGE_NAME }}
|
PACKAGE_NAME: ${{ env.PACKAGE_NAME }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
tar -czf "$PACKAGE_NAME" \
|
TMP_PACKAGE="/tmp/${PACKAGE_NAME}"
|
||||||
|
rm -f "$TMP_PACKAGE" "$PACKAGE_NAME"
|
||||||
|
|
||||||
|
tar -czf "$TMP_PACKAGE" \
|
||||||
|
--exclude="$PACKAGE_NAME" \
|
||||||
--exclude-vcs \
|
--exclude-vcs \
|
||||||
--exclude="./runtime/*" \
|
--exclude="./runtime/*" \
|
||||||
--exclude="./.trae/*" \
|
--exclude="./.trae/*" \
|
||||||
--exclude="./source/clients/uniapp/node_modules/*" \
|
--exclude="./source/clients/uniapp/node_modules/*" \
|
||||||
.
|
.
|
||||||
|
cp -f "$TMP_PACKAGE" "$PACKAGE_NAME"
|
||||||
|
|
||||||
- name: 创建远端目录
|
- name: 创建远端目录
|
||||||
uses: appleboy/ssh-action@v0.1.10
|
uses: appleboy/ssh-action@v0.1.10
|
||||||
|
|||||||
Reference in New Issue
Block a user