Skip to content

Commit e169f94

Browse files
readme update
1 parent 2a08351 commit e169f94

1 file changed

Lines changed: 46 additions & 45 deletions

File tree

README.md

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ The workflows that are available to use are
99
- [Combine Dependabot PRs](#combine-dependabot-prs)
1010
- [Dependabot Auto Approve and Merge](#dependabot-auto-approve-and-merge)
1111
- [PR Title Check](#pr-title-check)
12+
- [Get Repo Config](#get-repo-config)
1213
- [Quality Checks](#quality-checks)
1314
- [Quality Checks - Dev Container Version](#quality-checks---dev-container-version)
14-
- [Verify Image Digest and Attestation](#verify-image-digest-and-attestation)
1515
- [Tag Release](#tag-release)
1616
- [Tag Release - Devcontainer Version](#tag-release---devcontainer-version)
1717

@@ -127,6 +127,41 @@ jobs:
127127
uses: NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
128128
```
129129

130+
## Get Repo Config
131+
132+
This workflow extracts common config values, including the devcontainer image and version. This image then has its attestations verified, and provides a pinned image reference that can be used in downstream workflows.
133+
134+
#### Inputs
135+
136+
- `registry`: Container registry host. Default: `ghcr.io`
137+
- `namespace`: Image namespace/repository prefix. Default: `nhsdigital/eps-devcontainers`
138+
- `owner`: GitHub owner used by `gh attestation verify --owner`. Default: `NHSDigital`
139+
- `verify_published_from_main_image`: If true, verifies attestations published from `refs/heads/main`. Default: `true`
140+
- `predicate_type`: Attestation predicate type. Default: `https://slsa.dev/provenance/v1`
141+
142+
#### Outputs
143+
144+
- `tag_format`: The tag format to use for releases.
145+
- `devcontainer_image`: The pinned image reference for the devcontainer image.
146+
- `devcontainer_version`: The version of the devcontainer image.
147+
- `pinned_image`: The pinned image reference for the devcontainer image.
148+
- `resolved_digest`: The resolved digest for the devcontainer image.
149+
150+
#### Example
151+
152+
To use this workflow in your repository, call it from another workflow file:
153+
154+
```yaml
155+
name: Release
156+
157+
on:
158+
workflow_dispatch:
159+
160+
jobs:
161+
get_config_values:
162+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
163+
```
164+
130165
## Quality Checks
131166
This workflow runs common quality checks.
132167
To use this, you must have the following Makefile targets defined
@@ -182,7 +217,7 @@ To use this, you must have overridden any common makefile targets described in h
182217
- `run_sonar`: Whether to run Sonar checks or not.
183218
- `run_docker_scan`: whether to run a scan of Docker images
184219
- `docker_images`: csv list of Docker images to scan. These must match images produced by make docker-build
185-
- `runtime_docker_image`: the Docker image to run everything on. This should just be the image name and tag pushed to https://github.com/NHSDigital/eps-devcontainers
220+
- `pinned_image`: A pinned, verified image version upon which to run the container.
186221
#### Secret Inputs
187222
- `SONAR_TOKEN`: Token used to authenticate to Sonar
188223

@@ -201,57 +236,20 @@ on:
201236
workflow_dispatch:
202237
203238
jobs:
239+
get_config_values:
240+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
241+
204242
quality_checks:
205243
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
206244
needs: [get_config_values]
207245
with:
208-
runtime_docker_image: "${{ needs.get_config_values.outputs.devcontainer_image }}:githubactions-${{ needs.get_config_values.outputs.devcontainer_version }}"
246+
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
209247
run_docker_scan: true
210248
docker_images: fhir-facade,validator
211249
secrets:
212250
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
213251
```
214252

215-
## Verify Image Digest and Attestation
216-
This workflow resolves an image reference to a pinned digest and verifies GitHub artifact attestation for that image.
217-
218-
#### Inputs
219-
220-
- `runtime_docker_image`: Image reference as `name:tag` (for example `node_24_python_3_12:v1.2.3`) or a fully qualified image reference.
221-
- `registry`: Container registry host. Default: `ghcr.io`
222-
- `namespace`: Image namespace/repository prefix. Default: `nhsdigital/eps-devcontainers`
223-
- `owner`: GitHub owner used by `gh attestation verify --owner`. Default: `NHSDigital`
224-
- `verify_published_from_main_image`: If true, verifies attestations published from `refs/heads/main`. Default: `true`
225-
- `predicate_type`: Attestation predicate type. Default: `https://slsa.dev/provenance/v1`
226-
227-
#### Outputs
228-
229-
- `pinned_image`: Fully-qualified digest-pinned image reference.
230-
- `resolved_digest`: Resolved digest for the supplied image reference.
231-
232-
#### Example
233-
234-
To use this workflow in your repository, call it from another workflow file:
235-
236-
```yaml
237-
name: Verify Devcontainer Image
238-
239-
on:
240-
workflow_dispatch:
241-
242-
jobs:
243-
verify_attestation:
244-
uses: NHSDigital/eps-common-workflows/.github/workflows/verify-attestation.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
245-
with:
246-
runtime_docker_image: node_24_python_3_12:githubactions-v1.2.3
247-
registry: ghcr.io
248-
namespace: nhsdigital/eps-devcontainers
249-
owner: NHSDigital
250-
verify_published_from_main_image: true
251-
predicate_type: https://slsa.dev/provenance/v1
252-
```
253-
254-
255253
## Tag Release
256254
This workflow uses the semantic-release npm package to generate a new version tag, changelog, and GitHub release for a repo.
257255

@@ -297,7 +295,7 @@ This workflow uses the semantic-release npm package to generate a new version ta
297295

298296
- `dry_run`: Whether to run in dry_run mode (do not create tags) or not
299297
- `branch_name`: The branch name to base the release on
300-
- `runtime_docker_image`: the Docker image to run everything on. This should just be the image name and tag pushed to https://github.com/NHSDigital/eps-devcontainers
298+
- `pinned_image`: A pinned, verified image version upon which to run the container.
301299
- `publish_packages`: comma separated list of package folders to publish to an npm registry
302300
- `tagFormat`: Default `v\\${version}`. A template for the version tag.
303301
- `main_branch`: The branch to use for publishing. Defaults to main
@@ -323,13 +321,16 @@ on:
323321
workflow_dispatch:
324322
325323
jobs:
324+
get_config_values:
325+
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
326+
326327
tag_release:
327328
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
328329
needs: [get_config_values]
329330
with:
330331
tagFormat: "v\\${version}-beta"
331332
dry_run: true
332-
runtime_docker_image: "${{ needs.get_config_values.outputs.devcontainer_image }}:githubactions-${{ needs.get_config_values.outputs.devcontainer_version }}"
333+
pinned_image: "${{ needs.get_config_values.outputs.pinned_image }}"
333334
branch_name: main
334335
publish_package: false
335336
```

0 commit comments

Comments
 (0)