You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This workflow can be called to automatically approve and merge Dependabot PRs as part of the pull request workflow.
73
90
74
91
#### Requirements
@@ -91,7 +108,7 @@ jobs:
91
108
AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }}
92
109
AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }}
93
110
```
94
-
## pr title check
111
+
## PR Title Check
95
112
This workflow checks that all pull requests have a title that matches the required format, and comments on the PR with a link to the relevant ticket if a ticket reference is found.
To use this, you must have the following Makefile targets defined
116
133
- install
@@ -123,15 +140,15 @@ To use this, you must have the following Makefile targets defined
123
140
124
141
#### Inputs
125
142
126
-
- `install_java`: Whether to install java or not
127
-
- `run_sonar`: Whether to run sonar checks or not.
143
+
- `install_java`: Whether to install Java or not
144
+
- `run_sonar`: Whether to run Sonar checks or not.
128
145
- `asdfVersion`: Override the version of asdf to install.
129
-
- `reinstall_poetry`: If you are using this from a primarily python based project, you should set this to true to force a poetry reinstallation after python is installed
130
-
- `run_docker_scan`: whether to run a scan of docker images
131
-
- `docker_images`: csv list of docker images to scan. These must match images produced by make docker-build
146
+
- `reinstall_poetry`: If you are using this from a primarily Python based project, you should set this to true to force a poetry reinstallation after Python is installed
147
+
- `run_docker_scan`: whether to run a scan of Docker images
148
+
- `docker_images`: csv list of Docker images to scan. These must match images produced by make docker-build
132
149
133
150
#### Secret Inputs
134
-
- `SONAR_TOKEN`: Token used to authenticate to sonar
151
+
- `SONAR_TOKEN`: Token used to authenticate to Sonar
135
152
136
153
#### Outputs
137
154
@@ -157,17 +174,17 @@ jobs:
157
174
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
158
175
```
159
176
160
-
## quality checks - dev container version
177
+
## Quality Checks - Dev Container Version
161
178
This workflow runs common quality checks using a prebuilt devcontainer (https://github.com/NHSDigital/eps-devcontainers).
162
179
To use this, you must have overridden any common makefile targets described in https://github.com/NHSDigital/eps-devcontainers?tab=readme-ov-file#common-makefile-targets
163
180
#### Inputs
164
181
165
-
- `run_sonar`: Whether to run sonar checks or not.
166
-
- `run_docker_scan`: whether to run a scan of docker images
167
-
- `docker_images`: csv list of docker images to scan. These must match images produced by make docker-build
168
-
- `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
182
+
- `run_sonar`: Whether to run Sonar checks or not.
183
+
- `run_docker_scan`: whether to run a scan of Docker images
184
+
- `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
169
186
#### Secret Inputs
170
-
- `SONAR_TOKEN`: Token used to authenticate to sonar
187
+
- `SONAR_TOKEN`: Token used to authenticate to Sonar
171
188
172
189
#### Outputs
173
190
@@ -195,9 +212,48 @@ jobs:
195
212
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
196
213
```
197
214
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.
This workflow uses the semantic-release npm package to generate a new version tag, changelog, and github release for a repo.
255
+
## Tag Release
256
+
This workflow uses the semantic-release npm package to generate a new version tag, changelog, and GitHub release for a repo.
201
257
202
258
#### Inputs
203
259
@@ -211,7 +267,7 @@ This workflow uses the semantic-release npm package to generate a new version ta
211
267
#### Outputs
212
268
213
269
- `version_tag`: The version tag created by semantic-release.
214
-
- `change_set_version`: A timestamped string that con be used for creating changesets.
270
+
- `change_set_version`: A timestamped string that can be used for creating changesets.
215
271
216
272
#### Example
217
273
@@ -234,26 +290,27 @@ jobs:
234
290
publish_package: false
235
291
```
236
292
237
-
## tag release - devcontainer version
238
-
This workflow uses the semantic-release npm package to generate a new version tag, changelog, and github release for a repo.
239
-
*The devcontainer MUST have node installed*
293
+
## Tag Release - Devcontainer Version
294
+
This workflow uses the semantic-release npm package to generate a new version tag, changelog, and GitHub release for a repo.
295
+
*The devcontainer MUST have Node installed*
240
296
#### Inputs
241
297
242
298
- `dry_run`: Whether to run in dry_run mode (do not create tags) or not
243
299
- `branch_name`: The branch name to base the release on
244
-
- `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
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
245
301
- `publish_packages`: comma separated list of package folders to publish to an npm registry
246
302
- `tagFormat`: Default `v\\${version}`. A template for the version tag.
247
303
- `main_branch`: The branch to use for publishing. Defaults to main
248
304
- `extra_artifact_name`: optional param to include an extra artifact in the release
249
305
- `extra_artifact_id`: optional param of the extra artifact id to include in the release
250
306
- `extra_artifact_run_id`: optional param of the run id to download the extra artifact id to include in the release
251
307
- `extra_artifact_repository`optional param to indicate which repo the run to download the artifact was from
308
+
- `verify_published_from_main_image`indicates if we should verify the image was published from main branch in eps-devcontainers
252
309
253
310
#### Outputs
254
311
255
312
- `version_tag`: The version tag created by semantic-release.
256
-
- `change_set_version`: A timestamped string that con be used for creating changesets.
313
+
- `change_set_version`: A timestamped string that can be used for creating changesets.
257
314
258
315
#### Example
259
316
@@ -278,9 +335,9 @@ jobs:
278
335
```
279
336
280
337
281
-
## Secret scanning docker
338
+
## Secret Scanning Docker
282
339
283
-
The secret scanning also has a dockerfile, which can be run against a repo in order to scan it manually (or as part of pre-commit hooks). This can be done like so:
340
+
The secret scanning also has a Dockerfile, which can be run against a repo in order to scan it manually (or as part of pre-commit hooks). This can be done like so:
docker run -v /path/to/repo:/src git-secrets --scan-history .
@@ -302,7 +359,7 @@ In order to enable the pre-commit hook for secret scanning (to prevent developer
302
359
}
303
360
```
304
361
305
-
And the this pre-commit hook to the `.pre-commit-config.yaml` file:
362
+
And add this pre-commit hook to the `.pre-commit-config.yaml` file:
306
363
```yaml
307
364
repos:
308
365
- repo: local
@@ -317,28 +374,28 @@ repos:
317
374
language: system
318
375
```
319
376
320
-
## Run all releases
377
+
## Run All Releases
321
378
322
379
There are some scripts that can be used to trigger releases for all our repos.
323
380
It is invoked by running `./scripts/run_all_release.sh`.
324
-
This first authenticates to github using github cli tools to get a valid github token.
381
+
This first authenticates to GitHub using GitHub CLI tools to get a valid GitHub token.
325
382
326
383
It then has an array of repos which it loops through asking for confirmation if you want to run deployment for it.
327
384
328
-
For any that you have answered yes to, it then calls the python script `scripts/trigger_release.py`.
385
+
For any that you have answered yes to, it then calls the Python script `scripts/trigger_release.py`.
329
386
330
-
The python script will trigger the release.yml workflow for that repo and monitor the the run for it.
387
+
The Python script will trigger the release.yml workflow for that repo and monitor the run for it.
331
388
When it reaches one of the steps release_qa, release_ref, release_int it will approve release to that environment.
332
-
Once the run reaches release_prod step, the python script will exit.
333
-
The python script will also exit if the github run fails, or is cancelled at any step, or there is an unexpected response from github (eg user does not have permission to approve a deployment).
334
-
When the python script finishes, it logs the run url, the tag and summary of what happened.
389
+
Once the run reaches release_prod step, the Python script will exit.
390
+
The Python script will also exit if the GitHub run fails, or is cancelled at any step, or there is an unexpected response from GitHub (eg user does not have permission to approve a deployment).
391
+
When the Python script finishes, it logs the run URL, the tag and summary of what happened.
335
392
Python logs go to the console, and to a timestamped file in the logs folder.
336
393
337
394
When all runs of the python script have finished then the shell script exits showing a summary of failed and successful runs.
338
395
339
396
340
-
If a run fails on a step BEFORE the tag_release step, and the failure is transient (eg quality checks fails installing dependencies due to npm being down) then the whole release workflow can be rerun - either via this script or using the github website.
397
+
If a run fails on a step BEFORE the tag_release step, and the failure is transient (eg quality checks fails installing dependencies due to npm being down) then the whole release workflow can be rerun - either via this script or using the GitHub website.
341
398
342
-
If a run fails on a step AFTER the tag_release step, and the failure is transient (eg regression tests failure) then that failing step can just be re-run manually via the github website.
399
+
If a run fails on a step AFTER the tag_release step, and the failure is transient (eg regression tests failure) then that failing step can just be re-run manually via the GitHub website.
343
400
344
401
If a run fails due to a code or cloudformation/cdk issue, then a new pull request should be created to fix this, merged to main, and a new release triggered.
0 commit comments