修改ci为local-test分支的CI,并添加SSH发布步骤

This commit is contained in:
walker 2024-03-18 17:20:34 +08:00
parent accbe3c216
commit b123e8b921

View File

@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions
on:
push:
branches:
- develop
- local-test
jobs:
Docker-Build:
@ -39,16 +39,16 @@ jobs:
file: ./Dockerfile_Gitea
push: true
tags: |
gitea.joylink.club/joylink/rts-sim-testing-service:0.1.0
gitea.joylink.club/joylink/rts-sim-testing-service:develop
# - name: SSH Connect and Publish
# uses: http://120.46.212.6:3000/appleboy/ssh-action@v1.0.3
# with:
# host: ${{ secrets.LOCAL_SSH_HOST }}
# port: ${{ secrets.LOCAL_SSH_PORT }}
# username: ${{ secrets.LOCAL_SSH_USER }}
# password: ${{ secrets.LOCAL_SSH_PASSWORD }}
# script: |
# whoami
# sudo docker images
gitea.joylink.club/joylink/rts-sim-testing-service:local-test
- name: 发布到本地测试环境
uses: https://gitea.joylink.club/appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.LOCAL_233_SSH_HOST }}
port: ${{ secrets.LOCAL_233_SSH_PORT }}
username: ${{ secrets.LOCAL_233_SSH_USER }}
password: ${{ secrets.LOCAL_233_SSH_PASSWORD }}
script: |
docker rm -f rts-sim-testing-service || echo "rts-sim-testing-service not exist"
docker pull gitea.joylink.club/joylink/rts-sim-testing-service:local-test
docker run --name rts-sim-testing-service --restart=always --network net --ip 192.168.53.191 -d -p 9091:9091 -v /usr/local/joylink/logs/bjrtsts:/logs/bjrtsts gitea.joylink.club/joylink/rts-sim-testing-service:local-test rts-sim-testing-service -config test_local
- run: echo "This job's status is ${{ job.status }}."