Skip to content

Commit f443107

Browse files
CCM-11345 Manual Repo Sync (#85)
* CCM-11345 Manual Repo Sync * CCM-11345 Manual Repo Sync * CCM-11345 Manual Repo Sync * CCM-11345 Manual Repo Sync
1 parent 987e42a commit f443107

14 files changed

+315
-41
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: "Check Todo usage"
2+
description: "Check Todo usage"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: "Check Todo usage"
7+
shell: bash
8+
run: |
9+
export BRANCH_NAME=origin/${{ github.event.repository.default_branch }}
10+
check=branch ./scripts/githooks/check-todos.sh

.github/workflows/cicd-3-deploy.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4949
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
5050
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
51-
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
5251
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
5352
# echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
5453
- name: "List variables"

.github/workflows/scheduled-repository-template-sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
- name: Run syncronisation script
2929
run: |
30-
./scripts/githooks/sync-template-repo.sh
30+
./nhs-notify-repository-template/scripts/githooks/sync-template-repo.sh
3131
rm -Rf ./nhs-notify-repository-template
3232
3333
- name: Create Pull Request

.github/workflows/scorecard.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ jobs:
2727
# Needed to publish results and get a badge (see publish_results below).
2828
id-token: write
2929
# Uncomment the permissions below if installing in a private repository.
30-
# contents: read
31-
# actions: read
30+
contents: read
31+
actions: read
3232

3333
steps:
3434
- name: "Checkout code"
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
persist-credentials: false
3838

3939
- name: "Run analysis"
40-
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
40+
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
4141
with:
4242
results_file: results.sarif
4343
results_format: sarif
4444
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
4545
# - you want to enable the Branch-Protection check on a *public* repository, or
4646
# - you are installing Scorecard on a *private* repository
4747
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
48-
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
48+
repo_token: ${{ secrets.SCORECARD_TOKEN }}
4949

5050
# Public repositories:
5151
# - Publish results to OpenSSF REST API for easy access by consumers

.github/workflows/stage-1-commit.yaml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
scan-secrets:
3737
name: "Scan secrets"
3838
runs-on: ubuntu-latest
39-
timeout-minutes: 2
39+
timeout-minutes: 5
4040
steps:
4141
- name: "Checkout code"
4242
uses: actions/checkout@v4
@@ -47,7 +47,7 @@ jobs:
4747
check-file-format:
4848
name: "Check file format"
4949
runs-on: ubuntu-latest
50-
timeout-minutes: 2
50+
timeout-minutes: 5
5151
steps:
5252
- name: "Checkout code"
5353
uses: actions/checkout@v4
@@ -58,7 +58,7 @@ jobs:
5858
check-markdown-format:
5959
name: "Check Markdown format"
6060
runs-on: ubuntu-latest
61-
timeout-minutes: 2
61+
timeout-minutes: 5
6262
steps:
6363
- name: "Checkout code"
6464
uses: actions/checkout@v4
@@ -93,14 +93,25 @@ jobs:
9393
check-english-usage:
9494
name: "Check English usage"
9595
runs-on: ubuntu-latest
96-
timeout-minutes: 2
96+
timeout-minutes: 5
9797
steps:
9898
- name: "Checkout code"
9999
uses: actions/checkout@v4
100100
with:
101101
fetch-depth: 0 # Full history is needed to compare branches
102102
- name: "Check English usage"
103103
uses: ./.github/actions/check-english-usage
104+
check-todo-usage:
105+
name: "Check TODO usage"
106+
runs-on: ubuntu-latest
107+
timeout-minutes: 5
108+
steps:
109+
- name: "Checkout code"
110+
uses: actions/checkout@v4
111+
with:
112+
fetch-depth: 0 # Full history is needed to compare branches
113+
- name: "Check TODO usage"
114+
uses: ./.github/actions/check-todo-usage
104115
detect-terraform-changes:
105116
name: "Detect Terraform Changes"
106117
runs-on: ubuntu-latest
@@ -127,7 +138,7 @@ jobs:
127138
lint-terraform:
128139
name: "Lint Terraform"
129140
runs-on: ubuntu-latest
130-
timeout-minutes: 2
141+
timeout-minutes: 5
131142
needs: detect-terraform-changes
132143
if: needs.detect-terraform-changes.outputs.terraform_changed == 'true'
133144
steps:
@@ -145,7 +156,7 @@ jobs:
145156
- name: "Checkout code"
146157
uses: actions/checkout@v4
147158
- name: "Setup ASDF"
148-
uses: asdf-vm/actions/setup@v3
159+
uses: asdf-vm/actions/setup@v4
149160
- name: "Perform Setup"
150161
uses: ./.github/actions/setup
151162
- name: "Trivy Scan"
@@ -156,7 +167,7 @@ jobs:
156167
permissions:
157168
id-token: write
158169
contents: read
159-
timeout-minutes: 2
170+
timeout-minutes: 5
160171
steps:
161172
- name: "Checkout code"
162173
uses: actions/checkout@v4
@@ -175,7 +186,7 @@ jobs:
175186
permissions:
176187
id-token: write
177188
contents: read
178-
timeout-minutes: 2
189+
timeout-minutes: 5
179190
steps:
180191
- name: "Checkout code"
181192
uses: actions/checkout@v4

.github/workflows/stage-3-build.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
# - name: "Upload artefact 1"
9898
# run: |
9999
# echo "Uploading artefact 1 ..."
100-
# # TODO: Use either action/cache or action/upload-artifact
100+
# # Use either action/cache or action/upload-artifact
101101
# artefact-n:
102102
# name: "Artefact n"
103103
# runs-on: ubuntu-latest
@@ -114,4 +114,4 @@ jobs:
114114
# - name: "Upload artefact n"
115115
# run: |
116116
# echo "Uploading artefact n ..."
117-
# # TODO: Use either action/cache or action/upload-artifact
117+
# # Use either action/cache or action/upload-artifact

scripts/config/.repository-template-sync-ignore

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,30 @@ nhs-notify-repository-template/
44
# Files and Folders in this repository to ignore
55
.editorconfig
66
.github/CODEOWNERS
7+
.github/ISSUE_TEMPLATE
8+
.github/workflows/cicd-*.yaml
9+
.github/workflows/stage-*.yaml
710
.gitleaksignore
811
.vscode/
9-
/Makefile
12+
Makefile
1013
CHANGELOG.md
11-
README.md
12-
VERSION
1314
project.code-workspace
15+
README.md
1416
scripts/config/sonar-scanner.properties
1517
scripts/tests/
18+
VERSION
1619

1720
# Files and Folders in the template repository to disregard
1821
.devcontainer/
19-
.github/workflows/cicd-*.yaml
22+
.github/actions/build-docs
23+
.github/workflows/*.disabled
24+
*/examples/
2025
docs/
26+
eslint.config.mjs
2127
infrastructure/terraform/components/
28+
lambdas/example-lambda/
29+
package-lock.json
30+
package.json
2231
scripts/**/examples/
32+
scripts/terraform/terraform.mk
33+
src/.vscode/

scripts/config/.repository-template-sync-merge

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Files and folders to merge when syncing nhs-notify-repository-template back in to this repository
2+
.github/workflows/cicd-*.yaml
3+
.github/workflows/stage-*.yaml
24
scripts/config/.repository-template-sync-ignore
35
scripts/config/.repository-template-sync-merge
6+
scripts/config/pre-commit.yaml
47
.tool-versions
58
.gitignore
69
scripts/config/vale/vale.ini

scripts/config/markdownlint.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
# SEE: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
2+
3+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md
14
MD013: false
5+
6+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md
27
MD024:
38
siblings_only: true
9+
10+
# https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md
411
MD033: false

scripts/config/pre-commit.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,10 @@ repos:
7070
entry: ./scripts/githooks/check-terraform-docs.sh
7171
language: script
7272
pass_filenames: false
73+
- repo: local
74+
hooks:
75+
- id: check-todo-usage
76+
name: Check TODO usage
77+
entry: /usr/bin/env check=branch ./scripts/githooks/check-todos.sh
78+
language: script
79+
pass_filenames: false

0 commit comments

Comments
 (0)