This commit is contained in:
cyberman54 2023-01-21 15:10:45 +01:00
parent 818eb290e8
commit 7123c12fe2

View File

@ -45,20 +45,14 @@ jobs:
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install --upgrade platformio pip install --upgrade platformio
- name: Prepare config files - name: Prepare config files for test
run: | run: |
cp platformio_orig.ini platformio.ini cp platformio_orig.ini platformio.ini
cp src/loraconf_sample.h src/loraconf.h cp src/loraconf_sample.h src/loraconf.h
cp src/ota_sample.conf src/ota.conf cp src/ota_sample.conf src/ota.conf
cp src/paxcounter_orig.conf src/paxcounter.conf cp src/paxcounter_orig.conf src/paxcounter.conf
#sed -i "s/APPEUI\[8\] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/${{ secrets.APPEUI }}/" "src/loraconf.h" sed -i "s/APPEUI\[8\] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/${{ secrets.APPEUI }}/" "src/loraconf.h"
#sed -i "s/APPKEY\[16\] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/${{ secrets.APPKEY }}/" "src/loraconf.h" sed -i "s/APPKEY\[16\] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/${{ secrets.APPKEY }}/" "src/loraconf.h"
sed -i "s/APPEUI\[8\] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/$APPEUI/" "src/loraconf.h"
sed -i "s/APPKEY\[16\] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/$APPKEY/" "src/loraconf.h"
env:
# using env vars here to prevent print the keys in log
APPKEY: ${{ secrets.APPKEY }}
APPEUI: ${{ secrets.APPEUI }}
- name: Build and deploy for testboard - name: Build and deploy for testboard
env: env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }} PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}