31
31
target : [ "pi0", "pi2", "pi02w", "pi4" ]
32
32
steps :
33
33
- name : checkout seedsigner-os
34
- uses : actions/checkout@v3
34
+ uses : actions/checkout@v4
35
35
with :
36
36
repository : " seedsigner/seedsigner-os"
37
37
# use the os-ref input parameter in case of workflow_dispatch or default to main in case of cron triggers
42
42
fetch-depth : 0
43
43
44
44
- name : checkout source
45
- uses : actions/checkout@v3
45
+ uses : actions/checkout@v4
46
46
with :
47
47
# ref defaults to repo default-branch=dev (cron) or SHA of event (workflow_dispatch)
48
48
path : " seedsigner-os/opt/rootfs-overlay/opt"
78
78
ls -la src
79
79
80
80
- name : restore build cache
81
- uses : actions/cache@v3
81
+ uses : actions/cache@v4
82
82
# Caching reduces the build time to ~50% (currently: ~30 mins instead of ~1 hour,
83
83
# while consuming ~850 MB storage space).
84
84
with :
@@ -89,10 +89,25 @@ jobs:
89
89
restore-keys : |
90
90
build-cache-${{ matrix.target }}-
91
91
92
+ - name : Create build container
93
+ run : |
94
+ cd seedsigner-os
95
+ docker build -t seedsigner-os-build .
96
+
92
97
- name : build
93
98
run : |
94
- cd seedsigner-os/opt
95
- ./build.sh --${{ matrix.target }} --skip-repo --no-clean
99
+ mkdir -p \
100
+ ~/.buildroot-ccache \
101
+ seedsigner-os/buildroot_dl
102
+ docker run \
103
+ --rm \
104
+ -v "$(pwd)/seedsigner-os/opt:/opt" \
105
+ -v "$(pwd)/seedsigner-os/images:/images" \
106
+ -v "$(pwd)/seedsigner-os/buildroot_dl:/buildroot_dl" \
107
+ -v "${HOME}/.buildroot-ccache:/root/.buildroot-ccache" \
108
+ seedsigner-os-build \
109
+ --${{ matrix.target }} --skip-repo --no-clean
110
+ sudo chown -R $USER:$USER seedsigner-os/images seedsigner-os/buildroot_dl ~/.buildroot-ccache/
96
111
97
112
- name : list image (before rename)
98
113
run : |
@@ -113,9 +128,9 @@ jobs:
113
128
ls -la seedsigner-os/images
114
129
115
130
- name : upload images
116
- uses : actions/upload-artifact@v3
131
+ uses : actions/upload-artifact@v4
117
132
with :
118
- name : seedsigner_os_images
133
+ name : seedsigner_os_images-${{ matrix.target }}
119
134
path : " seedsigner-os/images/*.img"
120
135
if-no-files-found : error
121
136
# maximum 90 days retention
@@ -127,14 +142,13 @@ jobs:
127
142
needs : build
128
143
steps :
129
144
- name : download images
130
- uses : actions/download-artifact@v3
145
+ uses : actions/download-artifact@v4
131
146
with :
132
- name : seedsigner_os_images
133
147
path : images
134
148
135
149
- name : list images
136
150
run : |
137
- ls -la images
151
+ ls -lRa images
138
152
139
153
- name : get seedsigner latest commit hash
140
154
id : get-seedsigner-hash
@@ -145,12 +159,14 @@ jobs:
145
159
- name : write sha256sum
146
160
run : |
147
161
cd images
162
+ # each downloaded image is in its own subfolder
163
+ find . -name "*.img" -exec mv {} . \;
148
164
sha256sum *.img > seedsigner_os.${{ env.source_hash }}.sha256
149
165
150
166
- name : upload checksums
151
- uses : actions/upload-artifact@v3
167
+ uses : actions/upload-artifact@v4
152
168
with :
153
- name : seedsigner_os_images
169
+ name : seedsigner_os_images_sha256
154
170
path : " images/*.sha256"
155
171
if-no-files-found : error
156
172
# maximum 90 days retention
0 commit comments