File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -108,13 +108,20 @@ This job should be used in github actions wherever you need to get the dev conta
108108 echo "DEVCONTAINER_IMAGE_VERSION=$DEVCONTAINER_VERSION" >> "$GITHUB_OUTPUT"
109109```
110110## Using images in github actions
111- To use the image in github actions, you can use code like this
111+ To use the image in github actions, you should first verify the attestation of the image and reference the image by the digest
112+ For ci and release pipelines, you should set verify_published_from_main_image to ensure that only images published from main are used.
112113```
113114jobs:
115+ verify_attestation:
116+ uses: NHSDigital/eps-common-workflows/.github/workflows/verify-attestation.yml@<latest published version>
117+ with:
118+ runtime_docker_image: "${{ inputs.runtime_docker_image }}"
119+ verify_published_from_main_image: false
114120 my_job_name:
115121 runs-on: ubuntu-22.04
122+ needs: verify_attestation
116123 container:
117- image: ghcr.io/nhsdigital/eps-devcontainers/<container name>:githubactions-<tag>
124+ image: ${{ needs.verify_attestation.outputs.pinned_image }}
118125 options: --user 1001:1001 --group-add 128
119126 defaults:
120127 run:
You can’t perform that action at this time.
0 commit comments