Skip to content

Commit 18ed595

Browse files
committed
更新 actions
1 parent 4fdc3f6 commit 18ed595

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

.github/workflows/build.yaml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,20 @@ jobs:
3030
uses: useblacksmith/setup-node@v5
3131
with:
3232
node-version: '20'
33-
cache: 'yarn'
34-
cache-dependency-path: yarn.lock
3533

3634
- name: Build front
3735
run: |
3836
npm install -g yarn
3937
yarn && yarn build
4038
39+
- name: Setup Node
40+
# uses: actions/setup-node@v4
41+
uses: useblacksmith/setup-node@v5
42+
with:
43+
node-version: '20'
44+
cache: 'yarn'
45+
cache-dependency-path: yarn.lock
46+
4147
- name: Set up QEMU # 设置 QEMU 环境,用来模拟操作系统,用来编译 arm64 镜像和 amd64 镜像
4248
uses: docker/setup-qemu-action@v3
4349
with:
@@ -85,27 +91,8 @@ jobs:
8591
fi
8692
done
8793
88-
command="docker buildx build --platform linux/amd64,linux/arm64 --push . "
94+
command="docker buildx build --provenance=false --platform linux/amd64,linux/arm64 --push . "
8995
for repo in ${repos[@]}; do
90-
command="$command -t $repo\:latest -t $repo\:$(git rev-parse --short HEAD)"
96+
command="$command -t $repo\:latest -t $repo\:$(date +%Y-%m-%d_%H-%M-%S)_$(git rev-parse --short HEAD)"
9197
done
92-
echo "$command"
93-
eval $command
94-
95-
- name: executing remote ssh commands using ssh key
96-
uses: appleboy/[email protected]
97-
if: ${{ github.event.inputs.updateServerVersion == 'true' }}
98-
with:
99-
host: ${{ secrets.HOST }}
100-
port: ${{ secrets.PORT }}
101-
username: ${{ secrets.USERNAME }}
102-
passphrase: ${{ secrets.PASSPHRASE }}
103-
key: ${{ secrets.KEY }}
104-
script: |
105-
docker run --rm \
106-
-v /var/run/docker.sock:/var/run/docker.sock \
107-
-v ~/.docker/config.json:/config.json \
108-
containrrr/watchtower \
109-
--cleanup \
110-
--run-once \
111-
zfile-docs
98+
eval $command

0 commit comments

Comments
 (0)