From 40bd9a7769830a2afd9db69c922f14c7c0620673 Mon Sep 17 00:00:00 2001 From: Laurence Isla Date: Mon, 29 Apr 2024 12:20:00 -0500 Subject: [PATCH] ci: DRY the cleanup job for ARM servers --- .github/workflows/ci.yaml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 49c89aa02..4f188b7e4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -90,18 +90,6 @@ jobs: fingerprint: ${{ secrets.SSH_ARM_FINGERPRINT }} source: "${{ steps.Remote-Dir.outputs.remotepath }}/result.tar.xz" target: "result.tar.xz" - - name: Remove uploaded files from server - if: ${{ always() && !startsWith(github.ref, 'refs/tags/v') }} - uses: appleboy/ssh-action@master - env: - REMOTE_DIR: ${{ steps.Remote-Dir.outputs.remotepath }} - with: - host: ${{ secrets.SSH_ARM_HOST }} - username: ubuntu - key: ${{ secrets.SSH_ARM_PRIVATE_KEY }} - fingerprint: ${{ secrets.SSH_ARM_FINGERPRINT }} - envs: REMOTE_DIR - script: rm -rf $REMOTE_DIR - name: Extract downloaded binaries run: tar -xvf result.tar.xz && rm result.tar.xz - name: Save aarch64 executable as artifact @@ -315,7 +303,7 @@ jobs: needs: - arm - docker-arm - if: ${{ always() && startsWith(github.ref, 'refs/tags/v') }} + if: ${{ always() && vars.SSH_ARM_ENABLED }} runs-on: ubuntu-22.04 env: REMOTE_DIR: ${{ needs.arm.outputs.remotepath }}