Confirm firmware version

This commit is contained in:
Gunnar Skjold
2023-12-24 10:18:35 +01:00
parent 39e42d5333
commit ce2a67a284
2 changed files with 12 additions and 3 deletions

View File

@@ -60,6 +60,6 @@ jobs:
env:
CI: true
- name: PlatformIO lib install
run: pio lib install
run: pio pkg install
- name: PlatformIO run
run: pio run

View File

@@ -8,6 +8,11 @@ jobs:
runs-on: esp8266
steps:
- uses: actions/checkout@v4
- name: Get commit hash
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Check outputs
run: echo ${{ steps.vars.outputs.sha_short }}
- name: Inject secrets into ini file
run: |
sed -i 's/NO_AMS2MQTT_PRICE_KEY/AMS2MQTT_PRICE_KEY="${{secrets.AMS2MQTT_PRICE_KEY}}"/g' platformio.ini
@@ -47,6 +52,10 @@ jobs:
env:
CI: true
- name: PlatformIO lib install
run: pio lib install
run: pio pkg install
- name: PlatformIO run
run: pio run -t upload --upload-port /dev/ttyUSB0
run: pio run -t upload --upload-port /dev/ttyUSB0
- name: Wait for device to come online
run: waitforhost 10.42.0.67 80
- name: Confirm version
run: curl -s http://10.42.0.67/sysinfo.json|jq -r .version | grep "${{ steps.vars.outputs.sha_short }}" || exit 1