Skip to content

Commit

Permalink
New repository format (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Aug 4, 2024
1 parent e4ff067 commit d7f7900
Show file tree
Hide file tree
Showing 28 changed files with 438 additions and 224 deletions.
131 changes: 48 additions & 83 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,56 @@
name: Build

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
release:
types: [published]

jobs:
build:
name: Build ${{ matrix.firmware.name }}
runs-on: ubuntu-latest
strategy:
matrix:
firmware:
- file: m5stack-atom-lite.yaml
name: M5Stack Atom Lite
manifest_filename: m5stack-atom-lite-manifest.json
- file: esp32-generic.yaml
name: ESP32 Generic
manifest_filename: esp32-generic-manifest.json
- file: olimex-esp32-poe-iso.yaml
name: Olimex PoE ISO
manifest_filename: olimex-esp32-poe-iso-manifest.json
- file: wt32-eth01.yaml
name: Wireless-Tag WT32-ETH01
manifest_filename: wt32-eth01-manifest.json
- file: gl-s10.yaml
name: GL.iNet GL-S10
manifest_filename: gl-s10-manifest.json
- file: lilygo-t-eth-poe.yaml
name: LilyGO T-ETH-POE
manifest_filename: lilygo-t-eth-poe-manifest.json
fail-fast: false
steps:
- name: Checkout source code
uses: actions/[email protected]
- name: Build firmware
uses: esphome/[email protected]
id: esphome-build
with:
yaml_file: ${{ matrix.firmware.file }}
version: latest
- name: Copy firmware and manifest
run: |
mkdir output
mv ${{ steps.esphome-build.outputs.name }} output/
jq -s '{"name": "${{ matrix.firmware.name }}", "version": "${{ steps.esphome-build.outputs.version }}", "home_assistant_domain": "esphome", "new_install_prompt_erase": false, "builds":.}' output/${{ steps.esphome-build.outputs.name }}/manifest.json > output/${{ matrix.firmware.manifest_filename }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

- name: Upload artifact
uses: actions/[email protected]
with:
name: ${{ matrix.firmware.name }}
path: output
jobs:
build-generic-firmware:
name: Build Generic Firmware
uses: esphome/workflows/.github/workflows/build.yml@main
with:
files: |
esp32-generic/esp32-generic.factory.yaml
esp32-generic/esp32-generic-c3.factory.yaml
esphome-version: 2024.7.3
combined-name: esp32-generic
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}
release-url: ${{ github.event_name == 'release' && github.event.release.url || '' }}
release-version: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }}

consolidate:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
name: Consolidate firmwares
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Download built firmwares
uses: actions/download-artifact@v3
with:
path: firmwares
- name: Copy files
run: |-
mkdir output
cp -R static/* output/
cp -R firmwares/*/* output/
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
path: output
build-device-firmware:
name: Build Device Firmware
uses: esphome/workflows/.github/workflows/build.yml@main
with:
files: |
gl-inet/gl-s10.factory.yaml
lilygo/lilygo-t-eth-poe.factory.yaml
m5stack/m5stack-atom-lite.factory.yaml
m5stack/m5stack-atom-s3.factory.yaml
olimex/olimex-esp32-poe-iso.factory.yaml
wt32/wt32-eth01.factory.yaml
esphome-version: 2024.7.3
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}
release-url: ${{ github.event_name == 'release' && github.event.release.url || '' }}
release-version: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }}

deploy:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: consolidate
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
upload:
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
name: Upload to R2
needs:
- build-generic-firmware
- build-device-firmware
uses: esphome/workflows/.github/workflows/upload.yml@main
with:
name: bluetooth-proxy
version: ${{ needs.build-device-firmware.outputs.version }}
secrets: inherit
22 changes: 22 additions & 0 deletions .github/workflows/yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: YAML lint

on:
push:
branches: [main]
paths:
- "**.yaml"
- "**.yml"
pull_request:
paths:
- "**.yaml"
- "**.yml"

jobs:
yamllint:
name: 🧹 yamllint
runs-on: ubuntu-latest
steps:
- name: ⤵️ Check out configuration from GitHub
uses: actions/[email protected]
- name: 🚀 Run yamllint
run: yamllint --strict .
19 changes: 19 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
extends: default

ignore-from-file: .gitignore

rules:
document-start: disable
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
indentation:
level: error
spaces: 2
indent-sequences: true
check-multi-line-strings: false
line-length: disable
truthy: disable
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# This repository is deprecated

We have copied the source files to https://github.com/esphome/firmware/tree/main/bluetooth-proxy and the firmware is generated there.

# ESPHome Bluetooth Proxies

This repo hosts YAML configurations for a curated selection of known, tested devices that can serve as Bluetooth proxies for Home Assistant.
Expand Down
24 changes: 24 additions & 0 deletions esp32-generic/esp32-generic-c3.factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
packages:
esp32-generic-c3: !include esp32-generic-c3.yaml

esphome:
project:
name: esphome.bluetooth-proxy
version: dev

improv_serial:

ota:
- platform: http_request
id: ota_http_request

update:
- platform: http_request
id: update_http_request
name: Firmware
source: https://firmware.esphome.io/bluetooth-proxy/esp32-generic/manifest.json

http_request:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic-c3.yaml@main
46 changes: 46 additions & 0 deletions esp32-generic/esp32-generic-c3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
esphome:
name: esp32-bluetooth-proxy
friendly_name: Bluetooth Proxy
min_version: 2024.6.0
name_add_mac_suffix: true
platformio_options:
board_build.f_flash: 40000000L
board_build.flash_mode: dio
board_build.flash_size: 4MB

esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: n

wifi:
ap:

api:
logger:

ota:
- platform: esphome
id: ota_esphome

esp32_ble_tracker:
scan_parameters:
# We currently use the defaults to ensure Bluetooth
# can co-exist with WiFi In the future we may be able to
# enable the built-in coexistence logic in ESP-IDF
active: true

bluetooth_proxy:
active: true

button:
- platform: safe_mode
id: button_safe_mode
name: Safe Mode Boot

- platform: factory_reset
id: factory_reset_btn
name: Factory reset
24 changes: 24 additions & 0 deletions esp32-generic/esp32-generic.factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
packages:
esp32-generic: !include esp32-generic.yaml

esphome:
project:
name: esphome.bluetooth-proxy
version: dev

improv_serial:

ota:
- platform: http_request
id: ota_http_request

update:
- platform: http_request
id: update_http_request
name: Firmware
source: https://firmware.esphome.io/bluetooth-proxy/esp32-generic/manifest.json

http_request:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic.yaml@main
27 changes: 12 additions & 15 deletions esp32-generic.yaml → esp32-generic/esp32-generic.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
substitutions:
esphome:
name: esp32-bluetooth-proxy
friendly_name: Bluetooth Proxy

esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: true
project:
name: esphome.bluetooth-proxy
version: "1.0"

esp32:
board: esp32dev
Expand All @@ -20,11 +14,10 @@ wifi:

api:
logger:
ota:
improv_serial:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/esp32-generic.yaml@main
ota:
- platform: esphome
id: ota_esphome

esp32_ble_tracker:
scan_parameters:
Expand All @@ -37,6 +30,10 @@ bluetooth_proxy:
active: true

button:
- platform: safe_mode
name: Safe Mode Boot
entity_category: diagnostic
- platform: safe_mode
id: button_safe_mode
name: Safe Mode Boot

- platform: factory_reset
id: factory_reset_btn
name: Factory reset
22 changes: 22 additions & 0 deletions gl-inet/gl-s10.factory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
packages:
gl-s10: !include gl-s10.yaml

esphome:
project:
name: esphome.bluetooth-proxy
version: dev

ota:
- platform: http_request
id: ota_http_request

update:
- platform: http_request
id: update_http_request
name: Firmware
source: https://firmware.esphome.io/bluetooth-proxy/gl-s10/manifest.json

http_request:

dashboard_import:
package_import_url: github://esphome/bluetooth-proxies/gl-inet/gl-s10.yaml@main
Loading

0 comments on commit d7f7900

Please sign in to comment.