44 pull_request :
55 branches : [main]
66
7- env :
8- BRANCH_NAME : ${{ github.event.pull_request.head.ref }}
9-
7+ permissions : {}
108jobs :
119 get_config_values :
12- uses : NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@b0172dbdb3af4ae232873106553c316d79d784fc
10+ uses : NHSDigital/eps-common-workflows/.github/workflows/get-repo-config.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
1311 with :
1412 verify_published_from_main_image : false
13+ permissions :
14+ attestations : read
15+ contents : read
16+ packages : read
1517 dependabot-auto-approve-and-merge :
1618 needs : quality_checks
17- uses : NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@352f15f692c23b18f67215ad858f27b06a878717
19+ uses : NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
20+ permissions :
21+ contents : write
22+ pull-requests : write
1823 secrets :
1924 AUTOMERGE_APP_ID : ${{ secrets.AUTOMERGE_APP_ID }}
2025 AUTOMERGE_PEM : ${{ secrets.AUTOMERGE_PEM }}
2126 pr_title_format_check :
22- uses : NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@b0172dbdb3af4ae232873106553c316d79d784fc
27+ uses : NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
28+ permissions :
29+ pull-requests : write
2330 quality_checks :
24- uses : NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
31+ uses : NHSDigital/eps-common-workflows/.github/workflows/quality-checks-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
2532 needs : [get_config_values]
33+ permissions :
34+ contents : read
35+ id-token : write
36+ packages : read
2637 with :
2738 pinned_image : ${{ needs.get_config_values.outputs.pinned_image }}
2839 run_docker_scan : false
2940
3041 secrets :
3142 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
32-
33- get_issue_number :
34- runs-on : ubuntu-22.04
35- outputs :
36- issue_number : ${{steps.get_issue_number.outputs.result}}
37-
38- steps :
39- - uses : actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
40- name : get issue number
41- id : get_issue_number
42- with :
43- script : |
44- if (context.issue.number) {
45- // Return issue number if present
46- return context.issue.number;
47- } else {
48- // Otherwise return issue number from commit
49- return (
50- await github.rest.repos.listPullRequestsAssociatedWithCommit({
51- commit_sha: context.sha,
52- owner: context.repo.owner,
53- repo: context.repo.repo,
54- })
55- ).data[0].number;
56- }
57- result-encoding : string
58-
59-
6043 package_npm_code :
6144 needs : [quality_checks, get_config_values]
6245 uses : ./.github/workflows/package_npm_code.yml
@@ -65,11 +48,14 @@ jobs:
6548
6649 tag_release :
6750 needs : [get_config_values]
68- uses : NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@352f15f692c23b18f67215ad858f27b06a878717
51+ uses : NHSDigital/eps-common-workflows/.github/workflows/tag-release-devcontainer.yml@c8f899f30a6a726859b0277faa73cd9ff7f4de20
52+ permissions :
53+ contents : write
54+ id-token : write
55+ packages : write
6956 with :
7057 dry_run : true
7158 pinned_image : ${{ needs.get_config_values.outputs.pinned_image }}
7259 branch_name : ${{ github.event.pull_request.head.ref }}
7360 publish_packages : packages/cdkConstructs,packages/deploymentUtils
7461 tag_format : ${{ needs.get_config_values.outputs.tag_format }}
75- secrets : inherit
0 commit comments