ci: DRY the cleanup job for ARM servers
This commit is contained in:
@@ -90,18 +90,6 @@ jobs:
|
|||||||
fingerprint: ${{ secrets.SSH_ARM_FINGERPRINT }}
|
fingerprint: ${{ secrets.SSH_ARM_FINGERPRINT }}
|
||||||
source: "${{ steps.Remote-Dir.outputs.remotepath }}/result.tar.xz"
|
source: "${{ steps.Remote-Dir.outputs.remotepath }}/result.tar.xz"
|
||||||
target: "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
|
- name: Extract downloaded binaries
|
||||||
run: tar -xvf result.tar.xz && rm result.tar.xz
|
run: tar -xvf result.tar.xz && rm result.tar.xz
|
||||||
- name: Save aarch64 executable as artifact
|
- name: Save aarch64 executable as artifact
|
||||||
@@ -315,7 +303,7 @@ jobs:
|
|||||||
needs:
|
needs:
|
||||||
- arm
|
- arm
|
||||||
- docker-arm
|
- docker-arm
|
||||||
if: ${{ always() && startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ always() && vars.SSH_ARM_ENABLED }}
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
env:
|
env:
|
||||||
REMOTE_DIR: ${{ needs.arm.outputs.remotepath }}
|
REMOTE_DIR: ${{ needs.arm.outputs.remotepath }}
|
||||||
|
|||||||
Reference in New Issue
Block a user