This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: tencent-local
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build image
|
||||
run: docker build --build-arg GOPROXY=https://goproxy.cn,direct -t ufile:latest .
|
||||
|
||||
- name: Stop old container
|
||||
run: |
|
||||
if docker container inspect ufile >/dev/null 2>&1; then
|
||||
docker stop ufile
|
||||
fi
|
||||
|
||||
- name: Remove old container
|
||||
run: |
|
||||
if docker container inspect ufile >/dev/null 2>&1; then
|
||||
docker rm ufile
|
||||
fi
|
||||
|
||||
- name: Start new container
|
||||
run: |
|
||||
mkdir -p /root/deploy/ufile/data
|
||||
chown -R 10001:10001 /root/deploy/ufile/data
|
||||
docker run -d \
|
||||
--name ufile \
|
||||
--restart unless-stopped \
|
||||
-p 6616:6616 \
|
||||
-v /root/deploy/ufile/data:/data \
|
||||
ufile:latest \
|
||||
/usr/local/bin/ufile \
|
||||
--data /data \
|
||||
--address 0.0.0.0:6616
|
||||
Reference in New Issue
Block a user