2024-03-25 17:06:30 +08:00
|
|
|
name: 公网服务发布
|
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions
|
|
|
|
on:
|
|
|
|
schedule:
|
2024-03-25 18:39:10 +08:00
|
|
|
- cron: '30 3 * * 1' # 每周一的凌晨3:30
|
2024-03-25 17:06:30 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
Docker-Build-Push:
|
|
|
|
runs-on: joylink-local233
|
|
|
|
steps:
|
2024-03-25 18:19:31 +08:00
|
|
|
- name: 发布到正式环境1
|
|
|
|
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.PUB1_DOMAIN_SSH_HOST }}
|
|
|
|
port: ${{ secrets.PUB1_DOMAIN_SSH_PORT }}
|
|
|
|
username: ${{ secrets.PUB1_DOMAIN_SSH_USER }}
|
|
|
|
password: ${{ secrets.PUB1_DOMAIN_SSH_PASSWORD }}
|
|
|
|
script: |
|
|
|
|
docker rm -f rt-sim-training-service || echo "rt-sim-training-service not exist"
|
|
|
|
docker pull gitea.joylink.club/joylink/rt-sim-training-service:latest
|
|
|
|
docker run --name rt-sim-training-service -it -u root --restart=always -d -e APP_ENV=prd -p 9000:9000 -p 19000:19000 -v /usr/local/joylink/logs/rtss:/usr/local/joylink/logs/rtss gitea.joylink.club/joylink/rt-sim-training-service:latest
|
|
|
|
- name: 发布到正式环境2
|
|
|
|
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.PUB2_DOMAIN_SSH_HOST }}
|
|
|
|
port: ${{ secrets.PUB2_DOMAIN_SSH_PORT }}
|
|
|
|
username: ${{ secrets.PUB2_DOMAIN_SSH_USER }}
|
|
|
|
password: ${{ secrets.PUB2_DOMAIN_SSH_PASSWORD }}
|
|
|
|
script: |
|
|
|
|
docker rm -f rt-sim-training-service || echo "rt-sim-training-service not exist"
|
|
|
|
docker pull gitea.joylink.club/joylink/rt-sim-training-service:latest
|
|
|
|
docker run --name rt-sim-training-service -it -u root --restart=always -d -e APP_ENV=prd -p 9000:9000 -p 19000:19000 -v /usr/local/joylink/logs/rtss:/usr/local/joylink/logs/rtss gitea.joylink.club/joylink/rt-sim-training-service:latest
|