ESP32-PaxCounter/.github/workflows/build.yml
Workflow config file is invalid. Please check your config file: yaml: line 26: did not find expected '-' indicator
2023-01-21 14:13:52 +01:00

67 lines
2.1 KiB
YAML

name: PlatformIO CI/CD
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
- 'README.md'
push:
branches:
- master
- build-workflow
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
- 'README.md'
workflow_dispatch:
jobs:
deploy-on-testboard:
name: Deploy code on testboard
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Cache pip
uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v3
with:
path: ~\AppData\Local\platformio\Cache
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9.13"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Copy of necessary files
run: |
cp platformio_orig.ini platformio.ini
cp src/loraconf_sample.h src/loraconf.h
cp src/ota_sample.conf src/ota.conf
cp src/paxcounter_orig.conf src/paxcounter.conf
sed -i "s/APPEUI[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};/$APPEUI/g" "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/g" "src/loraconf.h"
env:
APPEUI: ${{secrets.APPEUI}}
APPKEY: ${{secrets.APPKEY}}
-name: test key
run: 'echo "$APPEUI"'
shell: bash
env:
SSH_KEY: ${{secrets.APPEUI}}
- name: Build and deploy for testboard
env:
PLATFORMIO_AUTH_TOKEN: ${{secrets.PLATFORMIO_AUTH_TOKEN}}
run: pio remote -a prenzlpi run -t upload -r