Skip to content

Commit 96d134b

Browse files
authored
Chore: [AEA-0000] - add workflow to sync copilot (#2538)
## Summary - Routine Change ### Details - add workflow to sync copilot
1 parent 5163ede commit 96d134b

File tree

5 files changed

+59
-14
lines changed

5 files changed

+59
-14
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"updateRemoteUserUID": false
1414
},
15-
"postAttachCommand": "git-secrets --register-aws; git-secrets --add-provider -- cat /usr/share/secrets-scanner/nhsd-rules-deny.txt",
1615
"mounts": [
1716
"source=${env:HOME}${env:USERPROFILE}/.aws,target=/home/vscode/.aws,type=bind",
1817
"source=${env:HOME}${env:USERPROFILE}/.ssh,target=/home/vscode/.ssh,type=bind",

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ updates:
2424
commit-message:
2525
prefix: "Upgrade: [dependabot] - "
2626
cooldown:
27-
default-days: 3
27+
default-days: 7
2828
- package-ecosystem: "github-actions"
2929
# Workflow files stored in the
3030
# default location of `.github/workflows`
@@ -37,7 +37,7 @@ updates:
3737
commit-message:
3838
prefix: "Upgrade: [dependabot] - "
3939
cooldown:
40-
default-days: 3
40+
default-days: 7
4141

4242
###################################
4343
# NPM workspace ##################
@@ -55,4 +55,4 @@ updates:
5555
registries:
5656
- npm-github
5757
cooldown:
58-
default-days: 3
58+
default-days: 7

.github/workflows/sync_copilot.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Sync Copilot Instructions
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 6 * * 1'
7+
8+
jobs:
9+
sync-copilot-instructions:
10+
runs-on: ubuntu-22.04
11+
environment: create_pull_request
12+
permissions:
13+
contents: read
14+
15+
steps:
16+
- name: Sync shared instructions
17+
uses: NHSDigital/eps-copilot-instructions@a7849a16aabd5c1edef13e29467a480fa08555f8
18+
with:
19+
copilot_instructions_ref: main
20+
calling_repo_base_branch: main
21+
CREATE_PULL_REQUEST_APP_ID: ${{ secrets.CREATE_PULL_REQUEST_APP_ID }}
22+
CREATE_PULL_REQUEST_PEM: ${{ secrets.CREATE_PULL_REQUEST_PEM }}
Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
name: Update Devcontainer Version
1+
name: Update devcontainer version
22

33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: "0 18 * * 4"
6+
- cron: '0 6 * * 4'
7+
permissions: {}
78

89
jobs:
9-
update_devcontainer_version:
10-
uses: NHSDigital/eps-common-workflows/.github/workflows/update-dev-container-version.yml@23342d86a245c076937abd6aecdd0ce06446b1e6
10+
update-devcontainer-version:
11+
runs-on: ubuntu-22.04
12+
environment: create_pull_request
1113
permissions:
1214
contents: read
1315
packages: read
14-
pull-requests: write
15-
with:
16-
base_branch: main
17-
secrets:
18-
CREATE_PULL_REQUEST_APP_ID: ${{ secrets.CREATE_PULL_REQUEST_APP_ID }}
19-
CREATE_PULL_REQUEST_PEM: ${{ secrets.CREATE_PULL_REQUEST_PEM }}
16+
17+
steps:
18+
- name: Update devcontainer version
19+
uses: NHSDigital/eps-update-devcontainer@dc3a8c5f11e7226ee4f5f2bb35bd0d1265092306
20+
with:
21+
calling_repo_base_branch: main
22+
CREATE_PULL_REQUEST_APP_ID: ${{ secrets.CREATE_PULL_REQUEST_APP_ID }}
23+
CREATE_PULL_REQUEST_PEM: ${{ secrets.CREATE_PULL_REQUEST_PEM }}

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ repos:
2323

2424
- repo: local
2525
hooks:
26+
- id: check-commit-signing
27+
name: Check commit signing
28+
description: Ensures that commits are GPG signed
29+
entry: bash
30+
args:
31+
- -c
32+
- |
33+
if ! git config --get commit.gpgsign | grep -q "true" > /dev/null 2>&1; then
34+
echo "Error: Commit signing is not enabled."
35+
echo "Please enable commit signing with:"
36+
echo " git config commit.gpgsign true"
37+
echo ""
38+
echo "For more information, see: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
39+
exit 1
40+
fi
41+
echo "Commit signing is properly configured."
42+
language: system
43+
pass_filenames: false
44+
always_run: true
45+
2646
- id: lint-getMyPrescriptions
2747
name: Lint getMyPrescriptions
2848
entry: npm

0 commit comments

Comments
 (0)