Skip to content

Commit 6738235

Browse files
committed
always push image
1 parent 8d11eab commit 6738235

5 files changed

Lines changed: 2 additions & 51 deletions

File tree

.github/workflows/build_all_images.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ name: build_all_images
88
tag_latest:
99
required: true
1010
type: boolean
11-
push_image:
12-
required: true
13-
type: boolean
1411
env:
1512
BRANCH_NAME: '${{ github.event.pull_request.head.ref }}'
1613
jobs:
@@ -35,7 +32,6 @@ jobs:
3532
docker_tag: ${{ inputs.docker_tag }}
3633
container_name: base
3734
base_folder: "."
38-
push_image: ${{ inputs.push_image }}
3935
package_language_docker_images:
4036
needs:
4137
- package_base_docker_image
@@ -50,7 +46,6 @@ jobs:
5046
docker_tag: ${{ inputs.docker_tag }}
5147
container_name: ${{ matrix.container_name }}
5248
base_folder: "languages"
53-
push_image: ${{ inputs.push_image }}
5449
package_project_docker_images:
5550
needs:
5651
- package_language_docker_images
@@ -66,4 +61,3 @@ jobs:
6661
docker_tag: ${{ inputs.docker_tag }}
6762
container_name: ${{ matrix.container_name }}
6863
base_folder: "projects"
69-
push_image: ${{ inputs.push_image }}

.github/workflows/build_multi_arch_image.yml

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ name: Build and push docker image
1414
base_folder:
1515
required: true
1616
type: string
17-
push_image:
18-
required: true
19-
type: boolean
2017

2118
jobs:
2219
build_and_push_image:
@@ -67,25 +64,6 @@ jobs:
6764
- name: make install
6865
run: |
6966
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-
shopt -s nullglob
79-
imgs=(eps-devcontainer-*.img)
80-
if [ ${#imgs[@]} -eq 0 ]; then
81-
echo "No images found to load."
82-
else
83-
for img in "${imgs[@]}"; do
84-
echo "Loading image from $img..."
85-
docker load -i "$img"
86-
rm "$img"
87-
done
88-
fi
8967
9068
- name: Build container
9169
run: |
@@ -150,7 +128,6 @@ jobs:
150128
ARCHITECTURE: '${{ matrix.arch }}'
151129
DOCKER_TAG: '${{ inputs.docker_tag }}'
152130
- name: Push tagged image
153-
if: ${{ inputs.push_image }}
154131
run: |
155132
echo "Pushing image..."
156133
docker push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}"
@@ -159,7 +136,7 @@ jobs:
159136
CONTAINER_NAME: '${{ inputs.container_name }}'
160137
ARCHITECTURE: '${{ matrix.arch }}'
161138
- name: Push latest image
162-
if: ${{ inputs.tag_latest && inputs.push_image }}
139+
if: ${{ inputs.tag_latest }}
163140
run: |
164141
docker tag "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}" "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-${ARCHITECTURE}"
165142
echo "Pushing image..."
@@ -168,25 +145,8 @@ jobs:
168145
DOCKER_TAG: ${{ inputs.docker_tag }}
169146
CONTAINER_NAME: '${{ inputs.container_name }}'
170147
ARCHITECTURE: '${{ matrix.arch }}'
171-
- name: Save image for upload
172-
if: ${{ !inputs.push_image }}
173-
run: |
174-
docker save "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}" -o "eps-devcontainer-${CONTAINER_NAME}-${DOCKER_TAG}-${ARCHITECTURE}.img"
175-
env:
176-
ARCHITECTURE: '${{ matrix.arch }}'
177-
DOCKER_TAG: '${{ inputs.docker_tag }}'
178-
CONTAINER_NAME: '${{ inputs.container_name }}'
179-
BASE_VERSION: ${{ inputs.docker_tag}}
180-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
181-
name: Upload docker images
182-
if: ${{ !inputs.push_image }}
183-
with:
184-
name: "eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-${{ matrix.arch }}.img"
185-
path: |
186-
eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-${{ matrix.arch }}.img
187148
publish_combined_image:
188-
if: ${{ inputs.push_image }}
189-
name: Publish image for ${{ inputs.container_name }}
149+
name: Publish combined image for ${{ inputs.container_name }}
190150
runs-on: ubuntu-22.04
191151
needs: build_and_push_image
192152
permissions:

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ jobs:
4545
with:
4646
docker_tag: '${{ needs.tag_release.outputs.version_tag }}'
4747
tag_latest: false
48-
push_image: false

.github/workflows/pull_request.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,3 @@ jobs:
9292
with:
9393
docker_tag: 'pr-${{ needs.get_issue_number.outputs.issue_number }}-${{ needs.get_commit_id.outputs.sha_short }}'
9494
tag_latest: false
95-
push_image: false

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@ jobs:
4646
with:
4747
docker_tag: '${{ needs.tag_release.outputs.version_tag }}'
4848
tag_latest: true
49-
push_image: true

0 commit comments

Comments
 (0)