1- #
1+ # yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
23name : Create and publish a Docker image
34
45# Configures this workflow to run every time a change is pushed to the branch called `release`.
2930 vendor : NHS England
3031 node_version : 24
3132 temp_dockerfile : /tmp/Dockerfile.source
32-
33+ image_prefix : nhsdigital/nhs-notify-devcontainer-
3334 # There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
3435jobs :
3536 deploy-nhs-notify-feature :
@@ -66,15 +67,12 @@ jobs:
6667 matrix :
6768 include :
6869 - container_name : base
69- image : nhsdigital/nhs-notify-devcontainer-base
7070 title : NHS Notifiy Devcontainer Base Image
7171 description : Base development container for NHS Notify projects
7272 - container_name : default
73- image : nhsdigital/nhs-notify-devcontainer-default
7473 title : NHS Notifiy Devcontainer Default Image
7574 description : Default development container for NHS Notify projects
7675 - container_name : loaded
77- image : nhsdigital/nhs-notify-devcontainer-loaded
7876 title : NHS Notifiy Devcontainer Loaded Image
7977 description : Loaded development container for NHS Notify projects
8078
@@ -115,14 +113,14 @@ jobs:
115113 name : Build
116114 working-directory : ${{env.base_dir}}/${{ matrix.container_name }}
117115 run : |
118- make build IMAGE_NAME=${{ env.registry }}/${{ matrix.image }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
116+ make build IMAGE_NAME=${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
119117
120118 - if : steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
121119 name : Extract metadata (tags, labels) for Docker
122120 id : meta
123121 uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
124122 with :
125- images : ${{ env.registry }}/${{ matrix.image }}
123+ images : ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}
126124 flavor : |
127125 latest=auto
128126 tags : |
@@ -143,7 +141,7 @@ jobs:
143141
144142 - if : steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
145143 name : create temp dockerfile source
146- run : echo 'FROM ${{ env.registry }}/${{ matrix.image }}' > ${{ env.temp_dockerfile }}
144+ run : echo 'FROM ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}' > ${{ env.temp_dockerfile }}
147145
148146 - if : steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
149147 name : Build and push Docker image
@@ -160,7 +158,7 @@ jobs:
160158 name : Generate artifact attestation
161159 uses : actions/attest-build-provenance@v3
162160 with :
163- subject-name : ${{ env.registry }}/${{ matrix.image }}
161+ subject-name : ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}
164162 subject-digest : ${{ steps.push.outputs.digest }}
165163 push-to-registry : false
166164
0 commit comments