-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e4ff067
commit d7f7900
Showing
28 changed files
with
438 additions
and
224 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 |
---|---|---|
@@ -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 |
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,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 . |
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,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 |
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
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 |
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,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 |
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,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 |
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
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 |
Oops, something went wrong.