Skip to content

Commit 2b9a15a

Browse files
remove version label from build.
1 parent aba7255 commit 2b9a15a

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/cicd.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- name: Build
6868
working-directory: ${{env.base_dir}}/${{ matrix.container_name }}
6969
run: |
70-
make build IMAGE_NAME=${{ env.registry }}/${{ matrix.image }} VERSION=${{ matrix.version }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
70+
make build IMAGE_NAME=${{ env.registry }}/${{ matrix.image }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
7171
7272
7373
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
@@ -80,6 +80,13 @@ jobs:
8080
latest=auto
8181
tags: |
8282
type=raw,value=latest,enable={{is_default_branch}}
83+
type=schedule
84+
type=semver,pattern={{version}}
85+
type=semver,pattern={{major}}.{{minor}}
86+
type=semver,pattern={{major}}
87+
type=ref,event=branch
88+
type=ref,event=pr
89+
type=sha
8390
labels: |
8491
org.opencontainers.image.title= ${{ matrix.title }}
8592
org.opencontainers.image.description=${{ matrix.description }}
@@ -88,8 +95,8 @@ jobs:
8895
org.opencontainers.image.source=${{ env.server }}/${{ env.org }}/${{ env.repository }}/tree/main/${{ env.base_dir }}/${{matrix.container_name}}/
8996
9097
# So we don't rebuild the container image, we create a simple Dockerfile that uses the previously built image as its source.
91-
- run: echo 'FROM ${{ env.registry }}/${{ matrix.image }}' > /tmp/Dockerfile.source
92-
98+
- name: create temp dockerfile source
99+
run: echo 'FROM ${{ env.registry }}/${{ matrix.image }}' > /tmp/Dockerfile.source
93100

94101
- name: Build and push Docker image
95102
id: push

src/devcontainers/base/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
IMAGE_NAME = ghcr.io/nhsdigital/nhs-notify-devcontainer-base
2-
VERSION = latest
32
WORKSPACE_FOLDER = ./src
43

54
build:
65
npm install -g @devcontainers/cli && \
76
BUILDKIT_PROGRESS=plain \
87
devcontainer build \
8+
--push false \
99
--workspace-folder $(WORKSPACE_FOLDER) \
10-
--image-name "$(IMAGE_NAME):$(VERSION)"
10+
--image-name "$(IMAGE_NAME)"

src/devcontainers/loaded/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
IMAGE_NAME = ghcr.io/nhsdigital/nhs-notify-devcontainer-loaded
2-
VERSION = latest
32
WORKSPACE_FOLDER = ./src
43

54
build:
65
npm install -g @devcontainers/cli && \
76
BUILDKIT_PROGRESS=plain \
87
devcontainer build \
8+
--push false \
99
--workspace-folder $(WORKSPACE_FOLDER) \
10-
--image-name "$(IMAGE_NAME):$(VERSION)"
10+
--image-name "$(IMAGE_NAME)"

0 commit comments

Comments
 (0)