From 80261e35cf3e7f0b499cb5fae0168dc283002416 Mon Sep 17 00:00:00 2001 From: ConvolutedDog <102723346+ConvolutedDog@users.noreply.github.com> Date: Wed, 4 Sep 2024 15:02:57 +0800 Subject: [PATCH] Create Remote-Docker-Test.yml --- .github/workflows/Remote-Docker-Test.yml | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/Remote-Docker-Test.yml diff --git a/.github/workflows/Remote-Docker-Test.yml b/.github/workflows/Remote-Docker-Test.yml new file mode 100644 index 00000000..08f672d9 --- /dev/null +++ b/.github/workflows/Remote-Docker-Test.yml @@ -0,0 +1,30 @@ +name: Remote Docker Test Workflow + +on: [push, pull_request, workflow_dispatch] + +jobs: + deploy: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup SSH and run commands + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.HOST }} + port: ${{ secrets.PORT }} + username: ${{ secrets.USER_NAME }} + password: ${{ secrets.USER_PASSWORD }} + script: | + docker exec ${{ secrets.DOCKER_CONTAINER_ID }} /bin/bash -c " + export PATH=\"/usr/local/cmake-3.25.2-linux-x86_64/bin:$PATH\" + cd /prajna && rm -rf /prajna/build_release/* + git pull > /dev/null 2>&1 || true + ./scripts/configure.sh release > ./scripts/configure.log + ./scripts/build.sh release > ./scripts/build.log + ./scripts/test.sh release + "