From 479f44ce04ae0983acba461a6fda48dd2b98ad9d Mon Sep 17 00:00:00 2001 From: paperspace <29749331+aarnphm@users.noreply.github.com> Date: Sun, 26 May 2024 17:24:16 +0000 Subject: [PATCH] fix: make sure to separate PR and main run Signed-off-by: paperspace <29749331+aarnphm@users.noreply.github.com> --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e23a5dda..932f2e39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,14 +29,24 @@ jobs: uv pip install --system httpx - name: startup machine run: python tools/machines.py --start ${{ secrets.PAPERSPACE_MACHINE_ID }} || true - - name: executing remote ssh commands using password + - name: running regression tests (PR) uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # ratchet:appleboy/ssh-action@v1.0.3 + if: github.event_name == 'pull_request' with: host: ${{secrets.PAPERSPACE_HOST}} username: ${{secrets.PAPERSPACE_USERNAME}} key: ${{secrets.PAPERSPACE_SSH_KEY}} port: ${{secrets.PAPERSPACE_PORT}} script: bash ci.sh --pr ${{github.event.number}} + - name: running regression tests (main) + uses: appleboy/ssh-action@029f5b4aeeeb58fdfe1410a5d17f967dacf36262 # ratchet:appleboy/ssh-action@v1.0.3 + if: ${{ !github.event.repository.fork && github.event_name == 'push' }} + with: + host: ${{secrets.PAPERSPACE_HOST}} + username: ${{secrets.PAPERSPACE_USERNAME}} + key: ${{secrets.PAPERSPACE_SSH_KEY}} + port: ${{secrets.PAPERSPACE_PORT}} + script: bash ci.sh --head evergreen: # https://github.com/marketplace/actions/alls-green#why if: always() needs: