File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed
Expand file tree Collapse file tree 2 files changed +52
-0
lines changed 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+ permissions : {}
9+
10+ jobs :
11+ sync-copilot-instructions :
12+ runs-on : ubuntu-22.04
13+ environment : create_pull_request
14+ permissions :
15+ contents : read
16+
17+ steps :
18+ - name : Sync shared instructions
19+ uses : NHSDigital/eps-copilot-instructions@304ab2f4b7cdc15a1d7c0a0fae5290fad41b2451
20+ with :
21+ copilot_instructions_ref : main
22+ calling_repo_base_branch : main
23+ CREATE_PULL_REQUEST_APP_ID : ${{ secrets.CREATE_PULL_REQUEST_APP_ID }}
24+ CREATE_PULL_REQUEST_PEM : ${{ secrets.CREATE_PULL_REQUEST_PEM }}
Original file line number Diff line number Diff line change @@ -49,6 +49,34 @@ repos:
4949 - -c
5050 - ' git-secrets --pre_commit_hook'
5151 language : system
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
5280
5381fail_fast : true
5482default_stages : [pre-commit]
You can’t perform that action at this time.
0 commit comments