1
- name : ESPHome Build
1
+ name : ESPHome Build and Commit Manifest
2
2
3
3
on :
4
4
push :
@@ -10,20 +10,37 @@ jobs:
10
10
build :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@v2
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v2
15
+
14
16
- name : Create empty secrets file
15
17
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
+
18
21
- name : Build ESPHome firmware
19
22
uses : esphome/build-action@v4.0.2
20
23
with :
21
24
yaml-file : firmware/config.yaml
22
25
release-summary : " Test"
23
26
complete-manifest : true
27
+
24
28
- name : List output files
25
29
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
+
27
44
- name : Upload Artifacts
28
45
uses : actions/upload-artifact@v4
29
46
with :
@@ -32,17 +49,18 @@ jobs:
32
49
openspool-esp32s2/*.bin
33
50
openspool-esp32s2/manifest.json
34
51
retention-days : 90
52
+
35
53
- name : Store Latest Commit Indefinitely
36
54
uses : actions/upload-artifact@v4
37
55
with :
38
56
name : openspool-esp32s2-latest
39
57
path : |
40
58
openspool-esp32s2/*.bin
41
59
openspool-esp32s2/manifest.json
42
-
60
+
43
61
cleanup :
44
- runs-on : ubuntu-latest
45
- steps :
62
+ runs-on : ubuntu-latest
63
+ steps :
46
64
- name : Delete old artifacts
47
65
uses : c-hive/gha-remove-artifacts@v1
48
66
with :
0 commit comments