From 9ddc9a4f5a2a84fda1b58b2bf6a2cfdf05a8bef6 Mon Sep 17 00:00:00 2001 From: CaCO3 Date: Tue, 17 Jan 2023 21:12:36 +0100 Subject: [PATCH] Update build.yaml --- .github/workflows/build.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d8e1d129..7195d6e1 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -52,7 +52,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/* + ./html/* key: generated-files-${{ github.run_id }} restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache @@ -70,9 +70,12 @@ jobs: #run: echo "Testing... ${{ github.ref_name }}, ${{ steps.vars.outputs.sha_short }}" > ./sd-card/html/version.txt; mkdir -p ./code/.pio/build/esp32cam/; cd ./code/.pio/build/esp32cam/; echo "${{ steps.vars.outputs.sha_short }}" > firmware.bin; cp firmware.bin partitions.bin; cp firmware.bin bootloader.bin # Testing run: cd code; platformio run --environment esp32cam - - name: Set Hash in all Web UI files - run: cd sd-card/html; find . -type f -exec sed -i 's/$COMMIT_HASH/${{ steps.vars.outputs.sha_short }}/g' {} \; - + - name: Prepare Web UI (copy data from repo and update hashes in all files) + run: | + rm -rf ./html; mkdir html + cp ./sd-card/html/* ./html/ + cd html; find . -type f -exec sed -i 's/$COMMIT_HASH/${{ steps.vars.outputs.sha_short }}/g' {} \; + ######################################################################################### @@ -97,7 +100,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/* + ./html/* key: generated-files-${{ github.run_id }} restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache @@ -120,7 +123,7 @@ jobs: cp "./code/.pio/build/esp32cam/firmware.bin" "update/firmware.bin" - name: Add Web UI to update - run: cp -r ./sd-card/html ./update/ + run: cp -r ./html ./update/ - name: Add CNN to update run: | @@ -158,7 +161,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/* + ./html/* key: generated-files-${{ github.run_id }} restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache @@ -181,7 +184,7 @@ jobs: cp "./code/.pio/build/esp32cam/firmware.bin" "remote_setup/firmware.bin" - name: Add Web UI to remote_setup - run: cp -r ./sd-card/html ./remote_setup/ + run: cp -r ./html ./remote_setup/ - name: Add whole config folder to remote_setup run: | @@ -213,7 +216,7 @@ jobs: ./code/.pio/build/esp32cam/firmware.bin ./code/.pio/build/esp32cam/partitions.bin ./code/.pio/build/esp32cam/bootloader.bin - ./sd-card/html/* + ./html/* key: generated-files-${{ github.run_id }} restore-keys: generated-files # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache