Skip to content

Commit 5e4cb35

Browse files
committed
update readme
1 parent 941fba3 commit 5e4cb35

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The workflows that are available to use are
1212
- [Get Repo Config](#get-repo-config)
1313
- [Quality Checks](#quality-checks)
1414
- [Quality Checks - Dev Container Version](#quality-checks---dev-container-version)
15+
- [Update Dev Container Version](#update-dev-container-version)
1516
- [Tag Release](#tag-release)
1617
- [Tag Release - Devcontainer Version](#tag-release---devcontainer-version)
1718

@@ -250,6 +251,47 @@ jobs:
250251
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
251252
```
252253

254+
## Update Dev Container Version
255+
This workflow updates `.devcontainer/devcontainer.json` with the latest published `v*` version for your configured devcontainer image from GHCR, then opens (or updates) a pull request with that change.
256+
257+
#### Requirements
258+
259+
- `.devcontainer/devcontainer.json` must include `build.args.IMAGE_NAME` and `build.args.IMAGE_VERSION`.
260+
- `AUTOMERGE_APP_ID` and `AUTOMERGE_PEM` secrets must be configured so the workflow can create a GitHub App token for PR creation.
261+
262+
#### Inputs
263+
264+
- `base_branch`: Target branch for the pull request. Default: `main`.
265+
266+
#### Secret Inputs
267+
268+
- `AUTOMERGE_APP_ID`: GitHub App ID used to generate an installation token.
269+
- `AUTOMERGE_PEM`: GitHub App private key used to generate an installation token.
270+
271+
#### Outputs
272+
273+
None
274+
275+
#### Example
276+
277+
To use this workflow in your repository, call it from another workflow file:
278+
279+
```yaml
280+
name: Update Devcontainer Version
281+
282+
on:
283+
workflow_dispatch:
284+
285+
jobs:
286+
update_devcontainer_version:
287+
uses: NHSDigital/eps-common-workflows/.github/workflows/update-dev-container-version.yml@f5c8313a10855d0cc911db6a9cd666494c00045a
288+
with:
289+
base_branch: main
290+
secrets:
291+
AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }}
292+
AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }}
293+
```
294+
253295
## Tag Release
254296
This workflow uses the semantic-release npm package to generate a new version tag, changelog, and GitHub release for a repo.
255297

0 commit comments

Comments
 (0)