Skip to content

Commit 78e27c5

Browse files
committed
commit manifest.json back to repo
1 parent 166746e commit 78e27c5

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

.github/workflows/build.yaml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ESPHome Build
1+
name: ESPHome Build and Commit Manifest
22

33
on:
44
push:
@@ -10,20 +10,37 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
1416
- name: Create empty secrets file
1517
run: |
16-
touch firmware/secrets.yaml
17-
touch firmware/conf.d/secrets.yaml
18+
touch firmware/secrets.yaml
19+
touch firmware/conf.d/secrets.yaml
20+
1821
- name: Build ESPHome firmware
1922
uses: esphome/build-action@v4.0.2
2023
with:
2124
yaml-file: firmware/config.yaml
2225
release-summary: "Test"
2326
complete-manifest: true
27+
2428
- name: List output files
2529
run: |
26-
ls -l
30+
ls -l openspool-esp32s2
31+
32+
- name: Copy manifest to firmware folder
33+
run: |
34+
cp openspool-esp32s2/manifest.json firmware/manifest.json
35+
36+
- name: Commit manifest file
37+
run: |
38+
git config --local user.email "action@github.com"
39+
git config --local user.name "GitHub Action"
40+
git add firmware/manifest.json
41+
git commit -m "Update manifest.json" || echo "No changes to commit"
42+
git push
43+
2744
- name: Upload Artifacts
2845
uses: actions/upload-artifact@v4
2946
with:
@@ -32,17 +49,18 @@ jobs:
3249
openspool-esp32s2/*.bin
3350
openspool-esp32s2/manifest.json
3451
retention-days: 90
52+
3553
- name: Store Latest Commit Indefinitely
3654
uses: actions/upload-artifact@v4
3755
with:
3856
name: openspool-esp32s2-latest
3957
path: |
4058
openspool-esp32s2/*.bin
4159
openspool-esp32s2/manifest.json
42-
60+
4361
cleanup:
44-
runs-on: ubuntu-latest
45-
steps:
62+
runs-on: ubuntu-latest
63+
steps:
4664
- name: Delete old artifacts
4765
uses: c-hive/gha-remove-artifacts@v1
4866
with:

0 commit comments

Comments
 (0)