From b123e8b92167268843a21210aa12113e03da4de3 Mon Sep 17 00:00:00 2001 From: walker Date: Mon, 18 Mar 2024 17:20:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9ci=E4=B8=BAlocal-test?= =?UTF-8?q?=E5=88=86=E6=94=AF=E7=9A=84CI=EF=BC=8C=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0SSH=E5=8F=91=E5=B8=83=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/{CI.yaml => CI_local_test.yaml} | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename .gitea/workflows/{CI.yaml => CI_local_test.yaml} (60%) 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