From 29f84b7e5f0035b4ef1db0a2f7c760dfb9c82671 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Sun, 22 Oct 2023 17:04:58 +0200 Subject: [PATCH] Push firmware builds to web-flasher using workflow --- .github/workflows/workflow.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index cefa272..efee26e 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -37,20 +37,33 @@ jobs: run: pip install --upgrade esptool - name: Create merged firmware binary - run: esptool.py --chip esp32s3 merge_bin -o full-firmware.bin --flash_mode dio 0x0000 .pio/build/esp32wemos-s3-mini_BW/bootloader.bin 0x8000 .pio/build/esp32wemos-s3-mini_BW/partitions.bin 0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x10000 .pio/build/esp32wemos-s3-mini_BW/firmware.bin 0x330000 .pio/build/esp32wemos-s3-mini_BW/spiffs.bin + run: mkdir -p output && esptool.py --chip esp32s3 merge_bin -o output/full-firmware.bin --flash_mode dio 0x0000 .pio/build/esp32wemos-s3-mini_BW/bootloader.bin 0x8000 .pio/build/esp32wemos-s3-mini_BW/partitions.bin 0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin 0x10000 .pio/build/esp32wemos-s3-mini_BW/firmware.bin 0x330000 .pio/build/esp32wemos-s3-mini_BW/spiffs.bin - name: Upload artifacts uses: actions/upload-artifact@v3 with: path: | .pio/build/esp32wemos-s3-mini_BW/*.bin - full-firmware.bin + output/full-firmware.bin - name: Create release uses: ncipollo/release-action@v1 with: tag: main commit: main - artifacts: "full-firmware.bin,.pio/build/esp32wemos-s3-mini_BW/*.bin" + artifacts: "output/full-firmware.bin,.pio/build/esp32wemos-s3-mini_BW/*.bin" allowUpdates: true - removeArtifacts: true \ No newline at end of file + removeArtifacts: true + - name: Pushes full-firmware.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: firmware/ + destination-github-username: 'btclock' + destination-repository-name: 'web-flasher' + target-branch: btclock + user-name: ${GITHUB_ACTOR} + user-email: ${GITHUB_ACTOR}@users.noreply.github.com \ No newline at end of file