From cbb0503603efbbd2763d529a70c9672255d99ded Mon Sep 17 00:00:00 2001 From: LucHeart Date: Fri, 10 Jan 2025 00:36:38 +0100 Subject: [PATCH] use action for other uploads aswell --- .github/actions/cdn-bump-version/action.yml | 14 ++++++++++++-- .github/actions/cdn-upload-firmware/action.yml | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/actions/cdn-bump-version/action.yml b/.github/actions/cdn-bump-version/action.yml index b63659e6..7de86cbe 100644 --- a/.github/actions/cdn-bump-version/action.yml +++ b/.github/actions/cdn-bump-version/action.yml @@ -26,12 +26,22 @@ inputs: runs: using: composite steps: - - name: Upload version file + - name: Prepare Upload Folder shell: bash run: | mkdir -p upload echo "${{ inputs.version }}" >> upload/version-${{ inputs.release-channel }}.txt - sshpass -p "${{ inputs.bunny-stor-password }}" scp -v -r upload/* ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/ + + - name: Upload version file + uses: milanmk/actions-file-deployer@master + with: + remote-protocol: "sftp" + remote-host: "${{ inputs.bunny-stor-hostname }}" + remote-user: "${{ inputs.bunny-stor-username }}" + remote-password: "${{ inputs.bunny-stor-password }}" + remote-path: "/" + local-path: "upload" + sync: "full" - name: Purge CDN cache shell: bash diff --git a/.github/actions/cdn-upload-firmware/action.yml b/.github/actions/cdn-upload-firmware/action.yml index 3d5d4d11..1d858480 100644 --- a/.github/actions/cdn-upload-firmware/action.yml +++ b/.github/actions/cdn-upload-firmware/action.yml @@ -49,10 +49,20 @@ runs: find . -type f -name '*.bin' -exec md5sum {} \; > hashes.md5.txt find . -type f -name '*.bin' -exec sha256sum {} \; > hashes.sha256.txt - - name: Upload artifacts to CDN + - name: Prepare Upload Folder shell: bash run: | mkdir -p upload mv *.bin upload/ mv hashes.*.txt upload/ - sshpass -p "${{ inputs.bunny-stor-password }}" scp -r upload/ ${{ inputs.bunny-stor-username }}@${{ inputs.bunny-stor-hostname }}:/${{ inputs.fw-version }}/${{ inputs.board }} \ No newline at end of file + + - name: Upload artifacts to CDN + uses: milanmk/actions-file-deployer@master + with: + remote-protocol: "sftp" + remote-host: "${{ inputs.bunny-stor-hostname }}" + remote-user: "${{ inputs.bunny-stor-username }}" + remote-password: "${{ inputs.bunny-stor-password }}" + remote-path: "/${{ inputs.fw-version }}/${{ inputs.board }}" + local-path: "upload" + sync: "full" \ No newline at end of file