Skip to content

Commit e159949

Browse files
committed
👷 Improved artifact generation + release body
1 parent 82e0740 commit e159949

File tree

2 files changed

+42
-18
lines changed

2 files changed

+42
-18
lines changed

.github/workflows/dev.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,15 @@ jobs:
8888
cache-from: type=gha
8989
cache-to: type=gha,mode=max
9090

91-
# Upload the generated files as artifacts
91+
# Zip generated files as a single artifact
92+
- name: 'Archive ${{ env.IMAGE_NAME }} generated files as a single artifact'
93+
run: zip -j ${{ env.IMAGE_NAME }}.zip ${{ env.IMAGE_DIR }}/docker/Dockerfile ${{ env.IMAGE_DIR }}/assets/shell/welcome
94+
95+
# Upload the zip artifact
9296
- uses: actions/upload-artifact@v4
9397
with:
9498
name: ${{ env.IMAGE_NAME }}
95-
path: |
96-
${{ env.IMAGE_DIR }}/docker/Dockerfile
97-
${{ env.IMAGE_DIR }}/assets/shell/welcome
99+
path: ${{ env.IMAGE_NAME }}.zip
98100
if-no-files-found: error
99101

100102
madsciencelab-plugins:
@@ -155,13 +157,15 @@ jobs:
155157
cache-from: type=gha
156158
cache-to: type=gha,mode=max
157159

158-
# Upload the generated files as artifacts
160+
# Zip generated files as a single artifact
161+
- name: 'Archive ${{ env.IMAGE_NAME }} generated files as a single artifact'
162+
run: zip -j ${{ env.IMAGE_NAME }}.zip ${{ env.IMAGE_DIR }}/docker/Dockerfile ${{ env.IMAGE_DIR }}/assets/shell/welcome
163+
164+
# Upload the zip artifact
159165
- uses: actions/upload-artifact@v4
160166
with:
161167
name: ${{ env.IMAGE_NAME }}
162-
path: |
163-
${{ env.IMAGE_DIR }}/docker/Dockerfile
164-
${{ env.IMAGE_DIR }}/assets/shell/welcome
168+
path: ${{ env.IMAGE_NAME }}.zip
165169
if-no-files-found: error
166170

167171
madsciencelab-arm-none-eabi:
@@ -222,13 +226,15 @@ jobs:
222226
cache-from: type=gha
223227
cache-to: type=gha,mode=max
224228

225-
# Upload the generated files as artifacts
229+
# Zip generated files as a single artifact
230+
- name: 'Archive ${{ env.IMAGE_NAME }} generated files as a single artifact'
231+
run: zip -j ${{ env.IMAGE_NAME }}.zip ${{ env.IMAGE_DIR }}/docker/Dockerfile ${{ env.IMAGE_DIR }}/assets/shell/welcome
232+
233+
# Upload the zip artifact
226234
- uses: actions/upload-artifact@v4
227235
with:
228236
name: ${{ env.IMAGE_NAME }}
229-
path: |
230-
${{ env.IMAGE_DIR }}/docker/Dockerfile
231-
${{ env.IMAGE_DIR }}/assets/shell/welcome
237+
path: ${{ env.IMAGE_NAME }}.zip
232238
if-no-files-found: error
233239

234240
madsciencelab-arm-none-eabi-plugins:
@@ -289,15 +295,18 @@ jobs:
289295
cache-from: type=gha
290296
cache-to: type=gha,mode=max
291297

292-
# Upload the generated files as artifacts
298+
# Zip generated files as a single artifact
299+
- name: 'Archive ${{ env.IMAGE_NAME }} generated files as a single artifact'
300+
run: zip -j ${{ env.IMAGE_NAME }}.zip ${{ env.IMAGE_DIR }}/docker/Dockerfile ${{ env.IMAGE_DIR }}/assets/shell/welcome
301+
302+
# Upload the zip artifact
293303
- uses: actions/upload-artifact@v4
294304
with:
295305
name: ${{ env.IMAGE_NAME }}
296-
path: |
297-
${{ env.IMAGE_DIR }}/docker/Dockerfile
298-
${{ env.IMAGE_DIR }}/assets/shell/welcome
306+
path: ${{ env.IMAGE_NAME }}.zip
299307
if-no-files-found: error
300308

309+
# After all Docker image builds, collect results and publish a pre-release
301310
artifacts-prerelease:
302311
runs-on: ubuntu-latest
303312
needs:
@@ -317,7 +326,7 @@ jobs:
317326
- uses: actions/download-artifact@v4
318327
with:
319328
# `pattern:` is a workaround to an artifact upload incompatibility with docker/build-push-action@v6
320-
# Otherwise, without `pattern:` the default of all artifacts would occur just as with this glob
329+
# Otherwise, apart from this bug requiring `pattern:` the default of all artifacts would occur without any intervention
321330
# https://github.com/docker/build-push-action/issues/1167
322331
pattern: "madsciencelab*"
323332
path: artifacts
@@ -332,7 +341,8 @@ jobs:
332341
with:
333342
prerelease: true
334343
allowUpdates: true
344+
bodyFile: .github/workflows/release.md
335345
commit: ${{ github.sha }}
336346
tag: ${{ env.SHA_SHORT }}
337-
name: Prerelease-${{ env.SHA_SHORT }}
347+
name: Dev Build Prerelease-${{ env.SHA_SHORT }}
338348
artifacts: "artifacts/**/Dockerfile,artifacts/**/welcome"

.github/workflows/release.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# MadScienceLab Docker Images Builds
2+
3+
Each build produces multiple variants of the `madsciencelab` Docker images containing Ceedling and its supporting frameworks as well as various utilities and compilation toolchains. Each image targets multiple host platforms.
4+
5+
A dev build of this repository in a Github Action generates files and validates the Docker image build. A release build also pushes the resulting Docker images to Docker hub.
6+
7+
See the [Docker Hub repository](https://hub.docker.com/r/throwtheswitch) for official releases of the resulting Docker images and their documentation.
8+
9+
# Contents
10+
11+
* A zip archive for each Docker image containing the generated Dockerfile and any other generated file artifacts used to build the image in Docker Hub.
12+
* A zip archive of the entire project including the static assets used to build the Docker images.
13+
14+
See this reository’s documentation for instructions on how to use the tools of this repository and how to build these Docker images.

0 commit comments

Comments
 (0)