Skip to content

Commit 82d9fd4

Browse files
committed
👷 Final Github Action tweaks & updates
1 parent 8498397 commit 82d9fd4

File tree

3 files changed

+57
-25
lines changed

3 files changed

+57
-25
lines changed

.github/workflows/dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ jobs:
307307
if-no-files-found: error
308308

309309
# After all Docker image builds, collect results and publish a pre-release
310-
artifacts-prerelease:
310+
artifacts-dev-build:
311311
runs-on: ubuntu-latest
312312
needs:
313313
- madsciencelab
@@ -344,5 +344,5 @@ jobs:
344344
bodyFile: .github/workflows/release.md
345345
commit: ${{ github.sha }}
346346
tag: ${{ env.SHA_SHORT }}
347-
name: Dev Build Prerelease-${{ env.SHA_SHORT }}
347+
name: Dev Build ${{ env.SHA_SHORT }}
348348
artifacts: "artifacts/*/*.zip"

.github/workflows/release.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
11
## MadScienceLab Docker Images Builds
22

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.
3+
Each build produces multiple variants of the `throwtheswitch/madsciencelab` Docker images containing Ceedling and its supporting frameworks as well as various utilities and compilation toolchains. Each image built from this repository targets multiple runtime host platforms.
44

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.
5+
Build types (via Github Actions):
6+
7+
1. A dev build of this repository generates files and validates the Docker image build.
8+
1. A release build adds to (1) by also pushing the resulting Docker images to Docker Hub.
69

710
See the [Docker Hub repository](https://hub.docker.com/r/throwtheswitch) for official releases of the resulting Docker images and their documentation.
811

9-
## Contents
12+
## Build Artifacts
1013

1114
* 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.
1215
* A zip archive of the entire project including the static assets used to build the Docker images.
1316

14-
See this reository’s documentation for instructions on how to use the tools of this repository and how to build these Docker images.
17+
See this reository’s documentation for instructions on how to use the tools of this repository and how to manually build the Docker images this repository maintains.
18+
19+
## Changelog
20+
21+
### Added
22+
23+
* ...
24+
25+
### Fixed
26+
27+
* ...
28+
29+
### Changed
30+
31+
* ...
32+
33+
### Removed
34+
35+
* ...
36+
37+

.github/workflows/release.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,15 @@ jobs:
8686
cache-from: type=gha
8787
cache-to: type=gha,mode=max
8888

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

98100
madsciencelab-plugins:
@@ -154,13 +156,15 @@ jobs:
154156
cache-from: type=gha
155157
cache-to: type=gha,mode=max
156158

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

166170
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:
@@ -290,13 +296,15 @@ jobs:
290296
cache-from: type=gha
291297
cache-to: type=gha,mode=max
292298

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

302310
artifacts-release:
@@ -318,7 +326,7 @@ jobs:
318326
- uses: actions/download-artifact@v4
319327
with:
320328
# `pattern:` is a workaround to an artifact upload incompatibility with docker/build-push-action@v6
321-
# 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
322330
# https://github.com/docker/build-push-action/issues/1167
323331
pattern: "madsciencelab*"
324332
path: artifacts
@@ -331,9 +339,10 @@ jobs:
331339
332340
- uses: ncipollo/release-action@v1
333341
with:
334-
# Defaults to using tag name.
342+
# Defaults to using commit tag for `tag:`.
335343
# This workflow is only triggered by tags.
336344
prerelease: false
337345
allowUpdates: true
338-
artifacts: "artifacts/**/Dockerfile,artifacts/**/welcome"
346+
name: Release ${{ github.ref_name }}
347+
artifacts: "artifacts/*/*.zip"
339348

0 commit comments

Comments
 (0)