Skip to content

set discovery back to false #278

set discovery back to false

set discovery back to false #278

Workflow file for this run

name: Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
release:
types: [created]
jobs:
build-upload:
runs-on: ubuntu-latest
name: Build
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install ESPHome
run: |
pip3 install wheel
pip3 install esphome
echo "esphome_version=$(esphome version) >> $GITHUB_OUTPUT"
mkdir assets
- id: alarm-panel-esp8266-version
uses: konnected-io/read-yaml@main
with:
file: './alarm-panel-esp8266.yaml'
key-path: '["substitutions", "project_version"]'
- id: alarm-panel-pro-wifi-version
uses: konnected-io/read-yaml@main
with:
file: './alarm-panel-pro-esp32-wifi.yaml'
key-path: '["substitutions", "project_version"]'
- id: alarm-panel-pro-ethernet-version
uses: konnected-io/read-yaml@main
with:
file: './alarm-panel-pro-esp32-ethernet.yaml'
key-path: '["substitutions", "project_version"]'
- id: alarm-panel-pro-v18-ethernet-version
uses: konnected-io/read-yaml@main
with:
file: './alarm-panel-pro-v1.8-ethernet.yaml'
key-path: '["substitutions", "project_version"]'
- id: garage-door-gdov1-s-version
uses: konnected-io/read-yaml@main
with:
file: './garage-door-GDOv1-S.yaml'
key-path: '["substitutions", "project_version"]'
- id: garage-door-gdov2-s-version
uses: konnected-io/read-yaml@main
with:
file: './garage-door-GDOv2-S.yaml'
key-path: '["substitutions", "project_version"]'
- id: garage-door-gdov2-q-version
uses: konnected-io/read-yaml@main
with:
file: './garage-door-GDOv2-Q.yaml'
key-path: '["substitutions", "project_version"]'
- name: Build Alarm Panel ESP8266
id: build-alarm-panel-esp8266
run: |
esphome compile alarm-panel-esp8266.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-alarm-panel-esp8266-${{ steps.alarm-panel-esp8266-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- name: Build Alarm Panel Pro v1.x (WiFi)
id: build-alarm-panel-pro-esp32-wifi
run: |
esphome compile alarm-panel-pro-esp32-wifi.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-alarm-panel-pro-v1-wifi-${{ steps.alarm-panel-pro-wifi-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- name: Build Alarm Panel Pro v1.x (Ethernet)
id: build-alarm-panel-pro-esp32-lan8720
run: |
esphome compile alarm-panel-pro-esp32-ethernet.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-alarm-panel-pro-v1-ethernet-${{ steps.alarm-panel-pro-ethernet-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- name: Build Alarm Panel Pro v1.8 (Ethernet)
id: build-alarm-panel-pro-esp32-rtl8201
run: |
esphome compile alarm-panel-pro-v1.8-ethernet.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-alarm-panel-pro-v1.8-ethernet-${{ steps.alarm-panel-pro-v18-ethernet-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- name: Build Garage Door GDOv1-S
id: build-garage-door-gdov1-s
run: |
esphome compile garage-door-GDOv1-S.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-garage-door-GDOv1-S-${{ steps.garage-door-gdov1-s-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- name: Build Garage Door GDOv2-S
id: build-garage-door-gdov2-s
run: |
esphome compile garage-door-GDOv2-S.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-garage-door-GDOv2-S-${{ steps.garage-door-gdov2-s-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- name: Build Garage Door GDOv2-Q
id: build-garage-door-gdov2-q
run: |
esphome compile garage-door-GDOv2-Q.yaml
build_path=.esphome/build/konnected/.pioenvs/konnected
fname=konnected-esphome-garage-door-GDOv2-Q-${{ steps.garage-door-gdov2-q-version.outputs.data }}.bin
cp $build_path/firmware.factory.bin assets/$fname
echo "fname=$fname" >> $GITHUB_OUTPUT
- uses: keithweaver/[email protected]
name: Upload Builds
with:
command: cp
source: assets/
destination: s3://konnected-io/builds/esphome/${{ github.ref_name }}
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: us-east-2
flags: --recursive --acl public-read
- name: Get release
if: github.event.release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Upload asset to release
if: github.event.release
uses: bgpat/release-asset-action@03b0c30db1c4031ce3474740b0e4275cd7e126a3
with:
pattern: "assets/*"
release-url: ${{ steps.get_release.outputs.upload_url }}
allow-overwrite: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: mkdir -p install-konnected/manifests
- name: Build Manifest for Alarm Panel / WiFi
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Alarm Panel / Alarm Panel Pro for ESPHome (WiFi)
MANIFEST_FNAME: esphome-alarm-panel-wifi.json
MANIFEST_VERSION: "${{ steps.alarm-panel-esp8266-version.outputs.data }} / ${{ steps.alarm-panel-pro-wifi-version.outputs.data }}"
ESP8266_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-alarm-panel-esp8266.outputs.fname }}
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-alarm-panel-pro-esp32-wifi.outputs.fname }}
- name: Build Manifest for GDO White
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected GDO White (GDOv1-S / GDOv2-S) for ESPHome
MANIFEST_FNAME: esphome-garage-door-wifi.json
MANIFEST_VERSION: "${{ steps.garage-door-gdov1-s-version.outputs.data }} / ${{ steps.garage-door-gdov2-s-version.outputs.data }}"
ESP8266_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-garage-door-gdov1-s.outputs.fname }}
ESP32_S3_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-garage-door-gdov2-s.outputs.fname }}
- name: Build Manifest for GDO blaQ
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected GDO blaQ (GDOv2-Q)
MANIFEST_FNAME: esphome-gdov2-q.json
MANIFEST_VERSION: "${{ steps.garage-door-gdov2-q-version.outputs.data }}"
ESP32_S3_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-garage-door-gdov2-q.outputs.fname }}
- name: Build Dev Manifest for GDO blaQ
if: github.ref_name == 'dev'
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected GDO blaQ (GDOv2-Q)[DEV]
MANIFEST_FNAME: esphome-gdov2-q-dev.json
MANIFEST_VERSION: "${{ steps.garage-door-gdov2-q-version.outputs.data }}"
ESP32_S3_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-garage-door-gdov2-q.outputs.fname }}
- name: Build Manifest for Alarm Panel Pro v1.x / LAN8720
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Alarm Panel Pro v1.x for ESPHome (Ethernet)
MANIFEST_FNAME: esphome-alarm-panel-lan8720.json
MANIFEST_VERSION: "${{ steps.alarm-panel-pro-ethernet-version.outputs.data }}"
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-alarm-panel-pro-esp32-lan8720.outputs.fname }}
- name: Build Manifest for Alarm Panel Pro v1.8 / RTL8201
if: github.event.release
run: |
ruby ./scripts/update-espwebtools-manifests.rb
env:
MANIFEST_NAME: Konnected Alarm Panel Pro v1.8 for ESPHome (Ethernet)
MANIFEST_FNAME: esphome-alarm-panel-rtl8201.json
MANIFEST_VERSION: "${{ steps.alarm-panel-pro-v18-ethernet-version.outputs.data }}"
ESP32_IMAGE_URI: https://konnected-io.s3.us-east-2.amazonaws.com/builds/esphome/${{ github.ref_name }}/${{ steps.build-alarm-panel-pro-esp32-rtl8201.outputs.fname }}
- name: Deploy
if: github.event.release
uses: reggionick/s3-deploy@v4
with:
folder: install-konnected
bucket: install-konnected
bucket-region: us-east-1
dist-id: E2FDL2RANMI9J7
invalidation: /manifests/*