diff --git a/.gitea/workflows/CI.yaml b/.gitea/workflows/CI_local_test.yaml similarity index 60% rename from .gitea/workflows/CI.yaml rename to .gitea/workflows/CI_local_test.yaml index 10afa01..d91ed01 100644 --- a/.gitea/workflows/CI.yaml +++ b/.gitea/workflows/CI_local_test.yaml @@ -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 }}." \ No newline at end of file