|
85 | 85 | CONTAINER_NAME: '${{ inputs.container_name }}' |
86 | 86 | MULTI_ARCH_TAG: '${{ inputs.docker_tag }}' |
87 | 87 | BASE_VERSION_TAG: ${{ inputs.docker_tag}} |
88 | | - IMAGE_TAG: ":${{ inputs.docker_tag }}-${{ matrix.arch }}" |
| 88 | + IMAGE_TAG: "${{ inputs.docker_tag }}-${{ matrix.arch }}" |
89 | 89 | BASE_FOLDER: "${{ inputs.base_folder }}" |
90 | 90 | - name: Check docker vulnerabilities - json output |
91 | 91 | uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 |
@@ -131,6 +131,11 @@ jobs: |
131 | 131 | run: | |
132 | 132 | echo "Pushing image..." |
133 | 133 | docker push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}" |
| 134 | + BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") |
| 135 | + export BUILD_TIMESTAMP |
| 136 | + docker buildx imagetools create \ |
| 137 | + --annotation "index:org.opencontainers.image.created=${BUILD_TIMESTAMP}" \ |
| 138 | + "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}" |
134 | 139 | env: |
135 | 140 | DOCKER_TAG: ${{ inputs.docker_tag }} |
136 | 141 | CONTAINER_NAME: '${{ inputs.container_name }}' |
@@ -164,10 +169,19 @@ jobs: |
164 | 169 |
|
165 | 170 | - name: Push multi-arch tagged image |
166 | 171 | run: | |
167 | | - docker buildx imagetools create -t "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}" \ |
| 172 | + BUILD_TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ") |
| 173 | + export BUILD_TIMESTAMP |
| 174 | + docker buildx imagetools create \ |
| 175 | + --annotation "index:org.opencontainers.image.source=https://github.com/NHSDigital/eps-devcontainers" \ |
| 176 | + --annotation "index:org.opencontainers.image.description=EPS devcontainer ${CONTAINER_NAME}:${DOCKER_TAG}" \ |
| 177 | + --annotation "index:org.opencontainers.image.licenses=MIT" \ |
| 178 | + --annotation "index:org.opencontainers.image.version=${DOCKER_TAG}" \ |
| 179 | + --annotation "index:org.opencontainers.image.containerName=${CONTAINER_NAME}" \ |
| 180 | + --annotation "index:org.opencontainers.image.created=${BUILD_TIMESTAMP}" \ |
| 181 | + --tag "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}" \ |
168 | 182 | "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-amd64" \ |
169 | 183 | "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-arm64" |
170 | | - echo "## PUSHED IMAGE : ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}" >> "$GITHUB_STEP_SUMMARY" |
| 184 | + echo "## PUSHED IMAGE : ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}" >> "$GITHUB_STEP_SUMMARY" |
171 | 185 | env: |
172 | 186 | DOCKER_TAG: ${{ inputs.docker_tag }} |
173 | 187 | CONTAINER_NAME: '${{ inputs.container_name }}' |
|
0 commit comments