From 51366f27e815459eae78b2bda71ee90671415e15 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sat, 25 Nov 2023 22:56:20 +0100 Subject: [PATCH] Push releases to webflasher --- .github/workflows/workflow.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 3f80740..69b9a76 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -94,20 +94,33 @@ jobs: - name: Create tarball run: tar czf webui.tgz --strip-components=1 dist - name: Build LittleFS - run: /tmp/mklittlefs/mklittlefs -c build_gz -s 409600 littlefs.bin + run: mkdir -p output && /tmp/mklittlefs/mklittlefs -c build_gz -s 409600 output/littlefs.bin - name: Upload artifacts uses: actions/upload-artifact@v3 with: path: | webui.tgz - littlefs.bin + output/littlefs.bin - name: Create release uses: ncipollo/release-action@v1 with: tag: ${{ steps.getBlockHeight.outputs.blockHeight }} commit: main name: release-${{ steps.getBlockHeight.outputs.blockHeight }} - artifacts: 'littlefs.bin,webui.tgz' + artifacts: 'output/littlefs.bin,webui.tgz' allowUpdates: true removeArtifacts: true makeLatest: true + - name: Pushes littlefs.bin to web flasher + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }} + with: + source-directory: output/ + target-directory: webui/ + destination-github-username: 'btclock' + destination-repository-name: 'web-flasher' + target-branch: btclock + user-name: ${{github.actor}} + user-email: ${{github.actor}}@users.noreply.github.com