Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"args": {
"DOCKER_GID": "${env:DOCKER_GID:}",
"IMAGE_NAME": "node_24_python_3_10",
"IMAGE_VERSION": "v1.2.0",
"IMAGE_VERSION": "v1.4.7",
"USER_UID": "${localEnv:USER_ID:}",
"USER_GID": "${localEnv:GROUP_ID:}"
}
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# restrict access to approving workflow changes
.github/workflows/ @NHSDigital/eps-administrators
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,26 @@ on:
push:
branches:
- main
permissions: {}

jobs:
get_config_values:
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
permissions:
attestations: read
contents: read
packages: read
with:
verify_published_from_main_image: true

quality_checks:
name: Quality Checks
needs: get_config_values
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
permissions:
contents: read
id-token: write
packages: read
with:
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
secrets:
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- main
workflow_dispatch:

permissions: {}
jobs:
pr_title_format_check:
name: PR Title Format Check
Expand All @@ -14,6 +15,10 @@ jobs:
pull-requests: write
get_config_values:
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
permissions:
attestations: read
contents: read
packages: read
with:
verify_published_from_main_image: false

Expand All @@ -23,11 +28,14 @@ jobs:
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
outputs:
pypi_token: ${{ steps.get_pypi_token.outputs.pypi_token }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
name: Checkout source code
with:
persist-credentials: false

- name: Get PyPI token
id: get_pypi_token
Expand All @@ -36,7 +44,11 @@ jobs:
quality_checks:
name: Quality Checks
needs: get_config_values
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
permissions:
contents: read
id-token: write
packages: read
with:
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
secrets:
Expand All @@ -45,7 +57,7 @@ jobs:
tag_release:
name: Tag Release (Dry Run)
needs: [get_config_values, get_pypi_token]
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
with:
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
branch_name: ${{ github.event.pull_request.head.ref }}
Expand All @@ -56,6 +68,7 @@ jobs:
permissions:
id-token: write
contents: write
packages: write

dependabot_auto_approve_and_merge:
name: Dependabot Auto Approve and Merge
Expand Down
32 changes: 26 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,55 @@ name: Release

on:
workflow_dispatch:
permissions: {}

jobs:
get_pypi_token:
name: Get PyPI Token for Trusted Publishing
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
outputs:
pypi_token: ${{ steps.get_pypi_token.outputs.pypi_token }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
name: Checkout source code
with:
persist-credentials: false
Comment thread
anthony-nhs marked this conversation as resolved.

- name: Get PyPI token
id: get_pypi_token
uses: ./.github/actions/get_pypi_token
get_config_values:
uses: NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
permissions:
attestations: read
contents: read
packages: read
with:
verify_published_from_main_image: false
quality_checks:
name: Quality Checks
needs: get_config_values
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
permissions:
contents: read
id-token: write
packages: read
with:
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

get_next_version:
name: Get Next Version Number for Poetry
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
needs: [get_config_values, quality_checks]
Comment thread
anthony-nhs marked this conversation as resolved.
permissions:
id-token: write
contents: write
packages: write
with:
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
branch_name: main
Expand All @@ -43,6 +59,8 @@ jobs:
build:
name: Build Package and Upload as Artifact
runs-on: ubuntu-22.04
permissions:
contents: read
container:
image: ${{ needs.get_config_values.outputs.pinned_image }}
options: --user 1001:1001 --group-add 128
Expand All @@ -57,7 +75,9 @@ jobs:
run: |
cp /home/vscode/.tool-versions "$HOME/.tool-versions"
- name: Git checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: make install
run: |
make install
Expand All @@ -80,7 +100,7 @@ jobs:

tag_release:
name: Tag Release
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@5ac2707dd9cd60ad127275179495b9c890d74711
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@e798d5aee897de6f7dc387dd5623fcd9ba4c8929
needs: [build, get_config_values, get_pypi_token]
with:
pinned_image: ${{ needs.get_config_values.outputs.pinned_image }}
Expand All @@ -94,6 +114,6 @@ jobs:
secrets:
PYPI_TOKEN: ${{ needs.get_pypi_token.outputs.pypi_token }}
permissions:
actions: write
contents: write
id-token: write
contents: write
packages: write
1 change: 1 addition & 0 deletions .github/workflows/sync_copilot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
permissions: {}

jobs:
sync-copilot-instructions:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ __pycache__/

# Temp
agents.md
.sbom/
5 changes: 5 additions & 0 deletions .grype.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
# urllib3 - fixed to older version to match spine
- vulnerability: GHSA-gm62-xv2j-4w53
- vulnerability: GHSA-2xpw-w6gg-jr37
- vulnerability: GHSA-38jv-5279-wg99
Comment thread
anthony-nhs marked this conversation as resolved.
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ repos:

- repo: local
hooks:
- id: grype-scan-local
name: Grype scan local changes
entry: make
args: ["grype-scan-local"]
Comment thread
anthony-nhs marked this conversation as resolved.
language: system
pass_filenames: false
always_run: true

- id: check-commit-signing
name: Check commit signing
description: Ensures that commits are GPG signed
Expand Down
12 changes: 0 additions & 12 deletions .trivyignore.yaml

This file was deleted.

1 change: 0 additions & 1 deletion trivy.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules:
unpinned-images:
# these workflows use unpinned images because they are using a full image passed in that contains the tag
ignore:
- release.yaml:65:7