Skip to content

Commit 36893f2

Browse files
committed
work images not being pushed
1 parent 6a1cd6d commit 36893f2

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/build_multi_arch_image.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,19 @@ jobs:
6767
- name: make install
6868
run: |
6969
make install-node
70+
- name: Download images
71+
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
72+
if: ${{ !inputs.push_image }}
73+
with:
74+
pattern: eps-devcontainer-*.img
75+
- name: Extract images
76+
if: ${{ !inputs.push_image }}
77+
run: |
78+
for img in eps-devcontainer-*.img; do
79+
echo "Loading image from $img..."
80+
docker load -i "$img"
81+
done
82+
7083
- name: Build container
7184
run: |
7285
echo "Building image..."
@@ -148,7 +161,22 @@ jobs:
148161
DOCKER_TAG: ${{ inputs.docker_tag }}
149162
CONTAINER_NAME: '${{ inputs.container_name }}'
150163
ARCHITECTURE: '${{ matrix.arch }}'
151-
164+
- name: Save image for upload
165+
if: ${{ !inputs.push_image }}
166+
run: |
167+
docker save "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}" -o "eps-devcontainer-${CONTAINER_NAME}-${DOCKER_TAG}-${ARCHITECTURE}.img"
168+
env:
169+
ARCHITECTURE: '${{ matrix.arch }}'
170+
DOCKER_TAG: '${{ inputs.docker_tag }}'
171+
CONTAINER_NAME: '${{ inputs.container_name }}'
172+
BASE_VERSION: ${{ inputs.docker_tag}}
173+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
174+
name: Upload docker images
175+
if: ${{ !inputs.push_image }}
176+
with:
177+
name: "eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-${{ matrix.arch }}.img"
178+
path: |
179+
eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-${{ matrix.arch }}.img
152180
publish_combined_image:
153181
if: ${{ inputs.push_image }}
154182
name: Publish image for ${{ inputs.container_name }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ The base image is built first, and then language images, and finally project ima
7070

7171
Docker images are scanned for vulnerabilities using trivy as part of a build step, and the build fails if vulnerabilities are found not in .trivyignore file.
7272

73+
Docker images are also uploaded as artifacts of build.
7374

7475
# Release workflow
7576
There is a release workflow that runs weekly at 18:00 on Thursday and on demand.

0 commit comments

Comments
 (0)