-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #156 from duhow/github-actions
- Loading branch information
Showing
3 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 2 | ||
matrix: | ||
version: [dev, 2024.8] | ||
variant: [esp32-test, hp-debug] | ||
container: | ||
image: ghcr.io/esphome/esphome:${{ matrix.version }} | ||
env: | ||
USERNAME: test | ||
PASSWORD: github-run | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Generate random secret | ||
env: | ||
keys: >- | ||
mqtt_password ota_pwd | ||
wifi_ssid wifi_password wifi_ssid3 wifi_password3 | ||
enc_keys: encryption_key_sejour encryption_key | ||
run: | | ||
for key in $keys ; do | ||
value=`head -c 100 /dev/urandom | base64 | cut -c 1-24 | head -n1` | ||
echo "${key}: ${value}" >> secrets.yaml | ||
done | ||
for key in $enc_keys ; do | ||
value=`head -c 32 /dev/urandom | base64` | ||
echo "${key}: ${value}" >> secrets.yaml | ||
done | ||
- run: esphome compile ${{ matrix.variant }}.yaml |
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
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