Skip to content

Commit dd0e5b6

Browse files
authored
fix(ci): resolve secrets context error and python version extraction (#236)
<!-- markdownlint-disable-next-line first-line-heading --> ## Description correct secrets context usage and python version extraction ## Context - Change GPG signing conditional to use env.APP_SIGNING_KEY instead of secrets context to avoid parse error - Fix python_version grep pattern (was duplicating nodejs version) ## Type of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. --> - [ ] Refactoring (non-breaking change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [X] Bug fix (non-breaking change which fixes an issue) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [X] I am familiar with the [contributing guidelines](../docs/CONTRIBUTING.md) - [X] I have followed the code style of the project - [ ] I have added tests to cover my changes - [X] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [X] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent f899cb3 commit dd0e5b6

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

β€Ž.github/workflows/cicd-2-publish.yamlβ€Ž

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
3535
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
3636
echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
37-
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
37+
echo "python_version=$(grep "^python" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3838
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
3939
- name: "List variables"
4040
run: |
@@ -64,7 +64,8 @@ jobs:
6464
app-id: ${{ secrets.APP_ID }}
6565
private-key: ${{ secrets.APP_PRIVATE_KEY }}
6666
- name: "Import GPG key and configure signing"
67-
if: ${{ secrets.APP_SIGNING_KEY != '' }}
67+
# Use env context for conditional check; secrets context not available in 'if' here without proper expression parsing.
68+
if: ${{ env.APP_SIGNING_KEY != '' }}
6869
env:
6970
APP_SIGNING_KEY: ${{ secrets.APP_SIGNING_KEY }}
7071
GPG_KEY_ID: ${{ secrets.APP_SIGNING_KEY_ID }}

β€Ždocs/developer-guides/Release_Signing_and_GitHub_App.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ Record:
143143
## 5. Export Keys and Create Revocation Certificate
144144

145145
```bash
146-
KEY_ID="ABC123DEF456789A" # Replace with your key ID
146+
KEY_ID="<YOUR_KEY_ID_HERE>" # Replace with your actual GPG key ID
147147
FPR="<REPLACE_WITH_FULL_FINGERPRINT>"
148148

149149
# Public key (for GitHub App)

β€Žscripts/config/gitleaks.tomlβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ regexes = [
1616
]
1717

1818
[allowlist]
19+
description = "Global allowlist for false positives"
1920
paths = [
2021
'''dist/index.js.map''',
2122
'''dist/index.js''',
2223
'''.terraform.lock.hcl''',
2324
'''poetry.lock''',
2425
'''yarn.lock''',
2526
]
27+
stopwords = [
28+
'''ABC123DEF456789A''', # Documentation placeholder for GPG key ID
29+
]

0 commit comments

Comments
Β (0)