Skip to content

Commit

Permalink
ci: DRY the cleanup job for ARM servers
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenceisla committed Apr 29, 2024
1 parent 5e41121 commit 40bd9a7
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down

0 comments on commit 40bd9a7

Please sign in to comment.