ci: DRY the cleanup job for ARM servers

This commit is contained in:
Laurence Isla
2024-04-29 12:20:00 -05:00
committed by GitHub
parent 5e41121551
commit 40bd9a7769
+1 -13
View File
@@ -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 }}