Skip to content

Commit adcd23a

Browse files
committed
inject missing components into examples
1 parent a2e3081 commit adcd23a

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/esphome-ci.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
1716
- id: find
1817
run: |
1918
configs=$(find examples -type f \( -name '*.yaml' -o -name '*.yml' \) \
2019
! -name 'm5stack.yaml' \
2120
! -name 'esp32_external_dac.yaml' | sort | jq -R -s -c 'split("\n")[:-1]')
2221
echo "configs=$configs" >> "$GITHUB_OUTPUT"
2322
24-
2523
validate:
2624
runs-on: ubuntu-latest
2725
needs: prepare
@@ -33,15 +31,28 @@ jobs:
3331
steps:
3432
- uses: actions/checkout@v4
3533

34+
- name: Install yq
35+
run: sudo apt-get update && sudo apt-get install -y yq
36+
3637
- name: ESPHome setup
3738
uses: ./.github/actions/esphome-setup
3839
with:
3940
create-secrets: "true"
4041

42+
- name: Inject extra package files
43+
run: |
44+
yq -i '
45+
(.packages.remote_package.files //= []) |
46+
(.packages.remote_package.files) += [
47+
"components/extra-sensors.yaml",
48+
"components/register_dump.yaml"
49+
] |
50+
(.packages.remote_package.files) |= unique
51+
' "${{ matrix.config }}"
52+
4153
- name: Validate config
4254
run: esphome config "${{ matrix.config }}"
4355

44-
4556
compile:
4657
runs-on: ubuntu-latest
4758
needs: prepare
@@ -53,10 +64,24 @@ jobs:
5364
steps:
5465
- uses: actions/checkout@v4
5566

67+
- name: Install yq
68+
run: sudo apt-get update && sudo apt-get install -y yq
69+
5670
- name: ESPHome setup
5771
uses: ./.github/actions/esphome-setup
5872
with:
5973
create-secrets: "true"
6074

75+
- name: Inject extra package files
76+
run: |
77+
yq -i '
78+
(.packages.remote_package.files //= []) |
79+
(.packages.remote_package.files) += [
80+
"components/extra-sensors.yaml",
81+
"components/register_dump.yaml"
82+
] |
83+
(.packages.remote_package.files) |= unique
84+
' "${{ matrix.config }}"
85+
6186
- name: Compile config
6287
run: esphome compile "${{ matrix.config }}"

0 commit comments

Comments
 (0)