File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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@304ab2f4b7cdc15a1d7c0a0fae5290fad41b2451
18+ with :
19+ copilot_instructions_ref : main
20+ calling_repo_base_branch : master
21+ CREATE_PULL_REQUEST_APP_ID : ${{ secrets.CREATE_PULL_REQUEST_APP_ID }}
22+ CREATE_PULL_REQUEST_PEM : ${{ secrets.CREATE_PULL_REQUEST_PEM }}
Original file line number Diff line number Diff line change @@ -49,8 +49,35 @@ repos:
4949 types_or : [sh, shell]
5050 pass_filenames : false
5151
52- - repo : local
53- hooks :
52+ - id : check-commit-signing
53+ name : Check commit signing
54+ description : Ensures that commits are GPG signed
55+ entry : bash
56+ args :
57+ - -c
58+ - |
59+ if ! git config --get user.signingkey > /dev/null 2>&1; then
60+ echo "Error: Git signing key not configured."
61+ echo "Please configure your GPG signing key with:"
62+ echo " git config user.signingkey <YOUR_GPG_KEY_ID>"
63+ echo ""
64+ echo "To find your GPG key ID, run: gpg --list-secret-keys --keyid-format=long"
65+ echo "For more information, see: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
66+ exit 1
67+ fi
68+ if ! git config --get commit.gpgsign | grep -q "true" > /dev/null 2>&1; then
69+ echo "Error: Commit signing is not enabled."
70+ echo "Please enable commit signing with:"
71+ echo " git config commit.gpgsign true"
72+ echo ""
73+ echo "For more information, see: https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits"
74+ exit 1
75+ fi
76+ echo "Commit signing is properly configured."
77+ language : system
78+ pass_filenames : false
79+ always_run : true
80+
5481 - id : git-secrets
5582 name : Git Secrets
5683 description : git-secrets scans commits, commit messages, and --no-ff merges to prevent adding secrets into your git repositories.
You can’t perform that action at this time.
0 commit comments