-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (57 loc) · 1.73 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: ESPHome Build and Commit Manifest
on:
push:
branches: [main]
paths:
- 'firmware/**'
paths-ignore:
- 'firmware/manifest.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Create empty secrets file
run: |
touch firmware/secrets.yaml
touch firmware/conf.d/secrets.yaml
- name: Build ESPHome firmware
uses: esphome/[email protected]
with:
yaml-file: firmware/config.yaml
release-summary: "Test" #TODO: change this to the commit message
complete-manifest: true
release-url: "https://raw.githubusercontent.com/spuder/OpenSpool/main/firmware/manifest.json"
- name: List output files
run: |
ls -l openspool-esp32s2
- name: Copy manifest to firmware folder
run: |
cp openspool-esp32s2/manifest.json firmware/manifest.json
- name: Commit manifest file
uses: EndBug/add-and-commit@v9
with:
committer_name: GitHub Actions
committer_email: [email protected]
message: Update manifest.json
add: "firmware/manifest.json"
push: true
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: openspool-esp32s2-${{ github.sha }}
path: |
openspool-esp32s2/*.bin
openspool-esp32s2/manifest.json
retention-days: 90
cleanup:
runs-on: ubuntu-latest
steps:
- name: Delete old artifacts
uses: c-hive/gha-remove-artifacts@v1
with:
age: '90 days'
skip-recent: 5