Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
316672f
setup github action
anthony-nhs Jan 7, 2026
ffbe7b9
fix pull_request action
anthony-nhs Jan 7, 2026
6e8825f
set tagformat
anthony-nhs Jan 7, 2026
fe133a5
build the image
anthony-nhs Jan 7, 2026
16938f8
use github token
anthony-nhs Jan 7, 2026
c14ba96
correct script
anthony-nhs Jan 7, 2026
94adbe2
run make install
anthony-nhs Jan 7, 2026
d0868ce
fix build
anthony-nhs Jan 7, 2026
57e5cd9
use setup-node rather than asdf
anthony-nhs Jan 7, 2026
989a38a
make install node
anthony-nhs Jan 7, 2026
6bdd72b
try different way of building
anthony-nhs Jan 7, 2026
8f16180
remove deps
anthony-nhs Jan 7, 2026
9d9eca7
add some debug
anthony-nhs Jan 7, 2026
8ffc5b0
do not update dist
anthony-nhs Jan 7, 2026
3e486dc
debug
anthony-nhs Jan 7, 2026
48ab087
clean
anthony-nhs Jan 7, 2026
35fc41b
fix it
anthony-nhs Jan 7, 2026
e985960
less verbose
anthony-nhs Jan 7, 2026
54797f4
do not install java
anthony-nhs Jan 7, 2026
d75d783
trigger build
anthony-nhs Jan 7, 2026
22fc0e8
push the image
anthony-nhs Jan 7, 2026
21c4a8e
free disk space first
anthony-nhs Jan 7, 2026
2eb8925
fix creating manifest
anthony-nhs Jan 7, 2026
7b5a8fd
push image
anthony-nhs Jan 7, 2026
6dd1636
fix name
anthony-nhs Jan 8, 2026
4ed613d
fix name
anthony-nhs Jan 8, 2026
dc10f7d
auth to github
anthony-nhs Jan 8, 2026
bf02c2a
build only on pull request
anthony-nhs Feb 6, 2026
d364522
add release workflow
anthony-nhs Feb 6, 2026
0efc577
fix tag
anthony-nhs Feb 6, 2026
577f940
get repos from one place
anthony-nhs Feb 6, 2026
075b2ea
add secret
anthony-nhs Feb 6, 2026
b4413b5
use token
anthony-nhs Feb 6, 2026
41a14e4
add trivyignore
anthony-nhs Feb 6, 2026
aade34c
fix build
anthony-nhs Feb 6, 2026
232c86f
use repo list from a different location
anthony-nhs Feb 6, 2026
fc029d0
add readme
anthony-nhs Feb 6, 2026
34fc02c
free space on build
anthony-nhs Feb 6, 2026
438de78
add common files
anthony-nhs Feb 6, 2026
eb06583
upload scan results
anthony-nhs Feb 6, 2026
fb3ed0b
update path
anthony-nhs Feb 6, 2026
b0127fd
update .trivyignore
anthony-nhs Feb 6, 2026
119f272
try publishing image
anthony-nhs Feb 6, 2026
02d47c4
correct login
anthony-nhs Feb 6, 2026
2d98a0c
correct workflow
anthony-nhs Feb 6, 2026
1ff4884
build base image
anthony-nhs Feb 12, 2026
fb4f07f
fix it
anthony-nhs Feb 12, 2026
c1635d9
more generic
anthony-nhs Feb 12, 2026
438e125
fix name
anthony-nhs Feb 12, 2026
57f26d5
add another image
anthony-nhs Feb 12, 2026
9236a42
build more images
anthony-nhs Feb 12, 2026
bbadc2d
correct tag
anthony-nhs Feb 12, 2026
828a182
update trivyignore
anthony-nhs Feb 12, 2026
1bed137
build multiple images
anthony-nhs Feb 12, 2026
989fd40
debug to find scan results
anthony-nhs Feb 12, 2026
0b67ad5
try a single path
anthony-nhs Feb 12, 2026
f096643
fix matrix
anthony-nhs Feb 12, 2026
831b8b7
add needs
anthony-nhs Feb 12, 2026
4cd5eac
fix name
anthony-nhs Feb 12, 2026
1944112
use specific trivyignore
anthony-nhs Feb 12, 2026
e06fc1a
bump trivy
anthony-nhs Feb 12, 2026
61ec9f7
upload combined trivyignore
anthony-nhs Feb 12, 2026
b903207
even more debug
anthony-nhs Feb 12, 2026
4a44268
more supressions
anthony-nhs Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitallowed
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id-token: write
password: \${{secrets\.GITHUB_TOKEN}}
\.gitallowed
1 change: 1 addition & 0 deletions .github/config/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TAG_FORMAT: "v${version}"
46 changes: 46 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#########################################################################
# Dependabot configuration file
#########################################################################

version: 2

updates:
- package-ecosystem: "github-actions"
# Workflow files stored in the
# default location of `.github/workflows`
directory: "/"
schedule:
interval: "weekly"
day: "friday"
time: "18:00" # UTC
open-pull-requests-limit: 20
commit-message:
prefix: "Upgrade: [dependabot] - "

###################################
# NPM workspace ##################
###################################
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
time: "18:00"
open-pull-requests-limit: 20
versioning-strategy: increase
commit-message:
prefix: "Upgrade: [dependabot] - "

###################################
# Poetry #########################
###################################
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "friday"
time: "18:00"
open-pull-requests-limit: 20
versioning-strategy: increase
commit-message:
prefix: "Upgrade: [dependabot] - "
59 changes: 59 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
## Summary

**Remove items from this list if they are not relevant. Remove this line once this has been done**

- Routine Change
- :exclamation: Breaking Change
- :robot: Operational or Infrastructure Change
- :sparkles: New Feature
- :warning: Potential issues that might be caused by this change

### Details

Add any summary information of what is in the change. **Remove this line if you have nothing to add.**

## Pull Request Naming

Pull requests should be named using the following format:

```text
Tag: [AEA-NNNN] - Short description
```

Tag can be one of:

- `Fix` - for a bug fix. (Patch release)
- `Update` - either for a backwards-compatible enhancement or for a rule change that adds reported problems. (Patch release)
- `New` - implemented a new feature. (Minor release)
- `Breaking` - for a backwards-incompatible enhancement or feature. (Major release)
- `Docs` - changes to documentation only. (Patch release)
- `Build` - changes to build process only. (No release)
- `Upgrade` - for a dependency upgrade. (Patch release)
- `Chore` - for refactoring, adding tests, etc. (anything that isn't user-facing). (Patch release)

If the current release is x.y.z then
- a patch release increases z by 1
- a minor release increases y by 1
- a major release increases x by 1

Correct tagging is necessary for our automated versioning and release process.

The description of your pull request will be used as the commit message for the merge, and also be included in the changelog. Please ensure that your title is sufficiently descriptive.

### Rerunning Checks

If you need to rename your pull request, you can restart the checks by either:

- Closing and reopening the pull request
- pushing an empty commit
```bash
git commit --allow-empty -m 'trigger build'
git push
```
- Amend your last commit and force push to the branch
```bash
git commit --amend --no-edit
git push --force
```

Rerunning the checks from within the pull request will not use the updated title.
33 changes: 33 additions & 0 deletions .github/workflows/build_all_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build_all_images
'on':
workflow_call:
inputs:
docker_tag:
required: true
type: string
tag_latest:
required: true
type: boolean
env:
BRANCH_NAME: '${{ github.event.pull_request.head.ref }}'
jobs:
package_base_docker_image:
uses: ./.github/workflows/build_multi_arch_image.yml
with:
tag_latest: ${{ inputs.tag_latest }}
docker_tag: ${{ inputs.docker_tag }}
container_name: base
package_non_base_docker_image:
needs:
- package_base_docker_image
strategy:
fail-fast: false
matrix:
include:
- container_name: node_24_python_3_14
- container_name: node_24_python_3_13
uses: ./.github/workflows/build_multi_arch_image.yml
with:
tag_latest: ${{ inputs.tag_latest }}
docker_tag: ${{ inputs.docker_tag }}
container_name: ${{ matrix.container_name }}
207 changes: 207 additions & 0 deletions .github/workflows/build_multi_arch_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
name: Build and push docker image
'on':
workflow_call:
inputs:
tag_latest:
required: true
type: boolean
docker_tag:
required: true
type: string
container_name:
required: true
type: string

jobs:
build_image:
name: Build image for ${{ inputs.container_name }} on ${{ matrix.arch }}
permissions:
id-token: write
runs-on: '${{ matrix.runner }}'
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
runner: ubuntu-22.04
- arch: arm64
runner: ubuntu-22.04-arm
steps:
- name: Free Disk Space for Docker
uses: endersonmenezes/free-disk-space@e6ed9b02e683a3b55ed0252f1ee469ce3b39a885
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
rm_cmd: rm
remove_packages: >-
azure-cli google-cloud-cli microsoft-edge-stable
google-chrome-stable firefox postgresql* temurin-* *llvm* mysql*
dotnet-sdk-*
remove_packages_one_command: true
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
fetch-depth: 0
- name: setup node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
with:
node-version-file: .tool-versions

- name: make install
run: |
make install-node
- name: Build container
run: |
make build-image
docker tag "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest" "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}"
docker save "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-${ARCHITECTURE}" -o "eps-devcontainer-${CONTAINER_NAME}-${DOCKER_TAG}-${ARCHITECTURE}.img"

# create combined trivy ignore file for use in trivy scan, combining common and specific ignore files if they exist
combined="src/${CONTAINER_NAME}/.trivyignore_combined.yaml"
common="src/common/.trivyignore.yaml"
specific="src/${CONTAINER_NAME}/.trivyignore.yaml"
echo "vulnerabilities:" > "$combined"
if [ -f "$common" ]; then sed -n '2,$p' "$common" >> "$combined"; fi
if [ -f "$specific" ]; then sed -n '2,$p' "$specific" >> "$combined"; fi
echo "Combined trivy ignore file created at $combined"
cat "$combined"

env:
ARCHITECTURE: '${{ matrix.arch }}'
DOCKER_TAG: '${{ inputs.docker_tag }}'
CONTAINER_NAME: '${{ inputs.container_name }}'
BASE_VERSION: ${{ inputs.docker_tag}}
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
name: Upload combined trivy ignore file
with:
name: "trivyigonre-${{ inputs.container_name }}-${{ matrix.arch }}"
path: src/${{ inputs.container_name }}/.trivyignore_combined.yaml
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
name: Upload docker images
with:
name: "eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-${{ matrix.arch }}.img"
path: |
eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-${{ matrix.arch }}.img
- name: Check docker vulnerabilities - json output
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
with:
scan-type: "image"
image-ref: "ghcr.io/nhsdigital/eps-devcontainers/${{ inputs.container_name }}:${{ inputs.docker_tag }}-${{ matrix.arch }}"
severity: "CRITICAL,HIGH"
scanners: "vuln"
vuln-type: "os,library"
format: "json"
output: "scan_results_docker.json"
exit-code: "0"
trivy-config: src/${{ inputs.container_name }}/trivy.yaml
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
name: Upload scan results
with:
name: "scan_results_docker_${{ inputs.container_name }}_${{ matrix.arch }}.json"
path: scan_results_docker.json
- name: Check docker vulnerabilities - table output
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
with:
scan-type: "image"
image-ref: "ghcr.io/nhsdigital/eps-devcontainers/${{ inputs.container_name }}:${{ inputs.docker_tag }}-${{ matrix.arch }}"
severity: "CRITICAL,HIGH"
scanners: "vuln"
vuln-type: "os,library"
format: "table"
output: "scan_results_docker.txt"
exit-code: "1"
trivy-config: src/${{ inputs.container_name }}/trivy.yaml

- name: Show docker vulnerability output
if: always()
run: |
echo "Scan output for ghcr.io/nhsdigital/eps-devcontainers/base:${DOCKER_TAG}-${ARCHITECTURE}"
if [ -f scan_results_docker.txt ]; then
cat scan_results_docker.txt
fi
env:
ARCHITECTURE: '${{ matrix.arch }}'
DOCKER_TAG: '${{ inputs.docker_tag }}'

publish_image:
name: Publish image for ${{ inputs.container_name }}
runs-on: ubuntu-22.04
needs: build_image
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Free Disk Space for Docker
uses: endersonmenezes/free-disk-space@e6ed9b02e683a3b55ed0252f1ee469ce3b39a885
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
rm_cmd: rm
remove_packages: >-
azure-cli google-cloud-cli microsoft-edge-stable
google-chrome-stable firefox postgresql* temurin-* *llvm* mysql*
dotnet-sdk-*
remove_packages_one_command: true
- name: Download amd64 images
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-amd64.img
- name: Download arm64 images
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: eps-devcontainer-${{ inputs.container_name }}-${{ inputs.docker_tag }}-arm64.img
- name: Login to github container registry
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}

- name: Load and push multi-arch tagged image
run: |
echo "loading images"
docker load -i "eps-devcontainer-${CONTAINER_NAME}-${DOCKER_TAG}-amd64.img"
docker load -i "eps-devcontainer-${CONTAINER_NAME}-${DOCKER_TAG}-arm64.img"

echo "pushing images"
docker push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-amd64"
docker push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-arm64"

echo "creating manifest"
docker manifest create "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}" \
--amend "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-amd64" \
--amend "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-arm64"

echo "pushing manifest"
docker manifest push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}"
env:
DOCKER_TAG: ${{ inputs.docker_tag }}
CONTAINER_NAME: '${{ inputs.container_name }}'

- name: Load and push multi-arch latest image
if: ${{ inputs.tag_latest }}
run: |
echo "Tagging latest images"
docker tag "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-amd64" "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-amd64"
docker tag "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:${DOCKER_TAG}-arm64" "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-arm64"

echo "pushing images"
docker push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-amd64"
docker push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-arm64"

echo "creating manifest"
docker manifest create "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest" \
--amend "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-amd64" \
--amend "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest-arm64"

echo "pushing manifest"
docker manifest push "ghcr.io/nhsdigital/eps-devcontainers/${CONTAINER_NAME}:latest"
env:
DOCKER_TAG: ${{ inputs.docker_tag }}
CONTAINER_NAME: '${{ inputs.container_name }}'
Loading
Loading