Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ESPHome Compilation | |
on: | |
push: | |
pull_request: | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12' | |
- name: Install ESPHome | |
run: | | |
python -m pip install --upgrade pip | |
pip install esphome | |
- name: Create secrets file | |
run: | | |
echo "wifi_ssid: \"myWifiSsid\"" > secrets.yaml | |
echo "wifi_password: \"myWifiPassword\"" >> secrets.yaml | |
echo "solar_router_ota_password: \"mySolarRouterOtaPassword\"" >> secrets.yaml | |
echo "api_encryption_key: \"bXlBcGlFbmNyeXB0aW9uS2V5\"" >> secrets.yaml | |
echo "hotspot_password: \"myHotspotPassword\"" >> secrets.yaml | |
- name: Compile esp32-proxy-client.yaml | |
continue-on-error: true | |
run: esphome compile esp32-proxy-client.yaml | |
id: conf1 | |
- name: Compile esp32-standalone.yaml | |
continue-on-error: true | |
run: esphome compile esp32-standalone.yaml | |
id: conf2 | |
- name: Compile esp8266-proof-of-concept.yaml | |
continue-on-error: true | |
run: esphome compile esp8266-proof-of-concept.yaml | |
id: conf3 | |
- name: Compile esp8285-power-meter-proxy.yaml | |
continue-on-error: true | |
run: esphome compile esp8285-power-meter-proxy.yaml | |
id: conf4 | |
- name: Check for compile errors | |
run: | | |
if [ ${{ steps.conf1.outcome }} == 'failure' ] || [ ${{ steps.conf2.outcome }} == 'failure' || ${{ steps.conf3.outcome }} == 'failure' ] || [ ${{ steps.conf4.outcome }} == 'failure']; then | |
echo "One or more compilations failed" | |
exit 1 | |
fi |