From 045298a87a9dda68e2ea60f2b64ddd08bf651bfe Mon Sep 17 00:00:00 2001 From: Brian Hanifin Date: Wed, 8 Feb 2023 09:25:09 -0800 Subject: [PATCH] migrate to fake secrets file for github build validation --- .github/workflows/build.yml | 20 ++++++++++---------- .stubs/secrets.yaml | 4 ---- common/wifi.yaml | 2 +- secrets.fake.yaml | 10 ++++++++++ 4 files changed, 21 insertions(+), 15 deletions(-) delete mode 100644 .stubs/secrets.yaml create mode 100644 secrets.fake.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b70335..7fb42f5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,27 +4,27 @@ name: build # yamllint disable-line rule:truthy on: - - push + push: jobs: esphome: runs-on: ubuntu-latest steps: - - name: ⤵️ Check out configuration from GitHub - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v1 + - name: ⤵️ Check out configuration from GitHub. + uses: actions/checkout@v3.1.0 + - name: Set up Python. + uses: actions/setup-python@v4 with: python-version: 3.7 - - name: Install dependencies + - name: Install dependencies. run: | python -m pip install --upgrade pip setuptools wheel pip install esphome pip list esphome version - - name: Copy secrets file into configuration folder - run: cp -R ./.stubs/* ./ - - name: Run esphome on all files + - name: Copy secrets file into configuration folder. + run: cp ./secrets.fake.yaml ./secrets.yaml + - name: 🚀Run esphome on all files. # yamllint disable rule:line-length run: | - for file in $(find ./ -type f -name "*.yaml" -not -name "secrets.yaml" -path "common"); do esphome "${file}" config; done + for file in $(find ./config/esphome -type f -name "*.yaml" -maxdepth 1 -not -name "secrets.yaml"); do esphome "${file}" config; done diff --git a/.stubs/secrets.yaml b/.stubs/secrets.yaml deleted file mode 100644 index b7f0282..0000000 --- a/.stubs/secrets.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -wifi_ssid: "" -wifi_password: "" -failover_password: "" diff --git a/common/wifi.yaml b/common/wifi.yaml index c970894..1028efd 100644 --- a/common/wifi.yaml +++ b/common/wifi.yaml @@ -1,5 +1,5 @@ wifi: ssid: !secret wifi_ssid password: !secret wifi_password - use_address: $ip + #use_address: $ip #reboot_timeout: 0s # Disable reboots for when Home Assistant is offline for an extended time. diff --git a/secrets.fake.yaml b/secrets.fake.yaml new file mode 100644 index 0000000..6e2f3ed --- /dev/null +++ b/secrets.fake.yaml @@ -0,0 +1,10 @@ +--- +# Failover Access Point +failover_password: "fakefailoverpassword" + +# Your Wi-Fi SSID and password +wifi_ssid: "fakewifissid" +wifi_password: "fakewifipassword" + +# API encryption key +encryption_key: "fakeencryptionkey" \ No newline at end of file