CCM-17709 adding action permissions#62
Conversation
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
There was a problem hiding this comment.
Pull request overview
Adds explicit GITHUB_TOKEN permissions to the CI/CD pull request workflow to keep it functioning under stricter default permissions when repositories are private/internal.
Changes:
- Adds a top-level
permissionsblock to the PR CI/CD workflow. - Grants
contents: read,pull-requests: read, andpages: writeat workflow scope.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
It looks like the CI workflows are failing due to missing permissions: Invalid workflow file The workflow is not valid. .github/workflows/cicd-1-pull-request.yaml (Line: 80, Col: 3): Error calling workflow 'NHSDigital/nhs-notify-supplier-config/.github/workflows/stage-1-commit.yaml@2bcbdb861c9027f1b15d954259ca62aa85c9a779'. The nested job 'terraform-docs' is requesting 'contents: write', but is only allowed 'contents: read'. .github/workflows/cicd-1-pull-request.yaml (Line: 80, Col: 3): Error calling workflow 'NHSDigital/nhs-notify-supplier-config/.github/workflows/stage-1-commit.yaml@2bcbdb861c9027f1b15d954259ca62aa85c9a779'. The nested job 'count-lines-of-code' is requesting 'id-token: write', but is only allowed 'id-token: none'. |
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
Signed-off-by: Tim Ireland <tim.ireland@hscic.gov.uk>
Description
Adding the necessary permission to the action to be able to run when repo is made private.
Context
SLDC -8 has been updated so that repos must be private/internal by default.
Type of changes
Checklist
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) 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.