Skip to content

Commit 64a3d86

Browse files
authored
Fix: [AEA-0000] - use common workflow (#1509)
## Summary - Routine Change ### Details - use common workflow
1 parent 25eb571 commit 64a3d86

File tree

12 files changed

+78
-152
lines changed

12 files changed

+78
-152
lines changed

.github/actions/mark_jira_released/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
using: "composite"
1313
steps:
1414
- name: connect to dev account
15-
uses: aws-actions/configure-aws-credentials@v4
15+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
1616
with:
1717
aws-region: eu-west-2
1818
role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

.github/actions/update_confluence_jira/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
using: "composite"
2929
steps:
3030
- name: connect to target account
31-
uses: aws-actions/configure-aws-credentials@v4
31+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
3232
with:
3333
aws-region: eu-west-2
3434
role-to-assume: ${{ inputs.TARGET_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
@@ -42,7 +42,7 @@ runs:
4242
run: ./get_target_deployed_tag.sh
4343

4444
- name: connect to dev account
45-
uses: aws-actions/configure-aws-credentials@v4
45+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
4646
with:
4747
aws-region: eu-west-2
4848
role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
@@ -54,7 +54,7 @@ runs:
5454
run: ./get_current_dev_tag.sh
5555

5656
- name: connect to dev account to run release notes lambda
57-
uses: aws-actions/configure-aws-credentials@v4
57+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
5858
with:
5959
aws-region: eu-west-2
6060
role-to-assume: ${{ inputs.DEV_CLOUD_FORMATION_EXECUTE_LAMBDA_ROLE }}

.github/workflows/cdk_package_code.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
packages: read
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
2323
with:
2424
ref: ${{ env.BRANCH_NAME }}
2525

@@ -35,7 +35,7 @@ jobs:
3535
asdf_version: ${{ steps.asdf-version.outputs.version }}
3636

3737
- name: Cache asdf
38-
uses: actions/cache@v4
38+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
3939
with:
4040
path: |
4141
~/.asdf
@@ -67,7 +67,7 @@ jobs:
6767
Makefile \
6868
cdk.json
6969
70-
- uses: actions/upload-artifact@v5
70+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
7171
name: upload build artifact
7272
with:
7373
name: build_artifact

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
1616
steps:
1717
- name: Checkout code
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
1919

2020
- name: Get asdf version
2121
id: asdf-version
@@ -27,7 +27,7 @@ jobs:
2727
echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
2828
2929
quality_checks:
30-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.5
30+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks.yml@a7daff06de7b695f601d9b1723ca184daca7d898
3131
needs: [get_asdf_version]
3232
with:
3333
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
@@ -46,7 +46,7 @@ jobs:
4646
4747
tag_release:
4848
needs: [quality_checks, get_commit_id, get_asdf_version]
49-
uses: NHSDigital/eps-workflow-semantic-release/.github/workflows/tag-release.yml@f3d071da30cd01dc0e4472ac0e2d7452db78d1c7
49+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@a7daff06de7b695f601d9b1723ca184daca7d898
5050
with:
5151
dry_run: true
5252
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}

.github/workflows/delete_old_cloudformation_stacks.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 'Delete old cloudformation stacks'
1+
name: "Delete old cloudformation stacks"
22

33
# Controls when the action will run - in this case triggered manually
44
on:
@@ -13,20 +13,20 @@ jobs:
1313
# The type of runner that the job will run on
1414
runs-on: ubuntu-22.04
1515
permissions:
16-
id-token: write
17-
contents: read
16+
id-token: write
17+
contents: read
1818

1919
# Steps represent a sequence of tasks that will be executed as part of the job
2020
steps:
2121
- name: Checkout local github scripts
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
2323
with:
2424
ref: ${{ env.BRANCH_NAME }}
2525
sparse-checkout: |
2626
.github/scripts
2727
2828
- name: Configure AWS Credentials
29-
uses: aws-actions/configure-aws-credentials@v5
29+
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8
3030
with:
3131
aws-region: eu-west-2
3232
role-to-assume: ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}

.github/workflows/dependabot_auto_approve_and_merge.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
name: Link Dev Website
2-
on:
2+
on:
33
pull_request:
44
types: [opened]
55
jobs:
6-
get_issue_number:
7-
runs-on: ubuntu-22.04
8-
outputs:
9-
issue_number: ${{steps.get_issue_number.outputs.result}}
10-
11-
steps:
12-
- uses: actions/github-script@v8
13-
name: get issue number
14-
id: get_issue_number
15-
with:
16-
script: |
17-
if (context.issue.number) {
18-
// Return issue number if present
19-
return context.issue.number;
20-
} else {
21-
// Otherwise return issue number from commit
22-
return (
23-
await github.rest.repos.listPullRequestsAssociatedWithCommit({
24-
commit_sha: context.sha,
25-
owner: context.repo.owner,
26-
repo: context.repo.repo,
27-
})
28-
).data[0].number;
29-
}
30-
result-encoding: string
31-
32-
link-dev-website:
33-
needs: [get_issue_number]
34-
runs-on: ubuntu-22.04
35-
continue-on-error: true
36-
steps:
37-
- name: Link Dev Website
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
uses: unsplash/comment-on-pr@b5610c6125a7197eaec80072ea35ef53e1fc6035
41-
with:
42-
msg: |
43-
Deployed URL: https://cpt-ui-pr-${{ needs.get_issue_number.outputs.issue_number }}.dev.eps.national.nhs.uk/site
6+
get_issue_number:
7+
runs-on: ubuntu-22.04
8+
outputs:
9+
issue_number: ${{steps.get_issue_number.outputs.result}}
10+
11+
steps:
12+
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
13+
name: get issue number
14+
id: get_issue_number
15+
with:
16+
script: |
17+
if (context.issue.number) {
18+
// Return issue number if present
19+
return context.issue.number;
20+
} else {
21+
// Otherwise return issue number from commit
22+
return (
23+
await github.rest.repos.listPullRequestsAssociatedWithCommit({
24+
commit_sha: context.sha,
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
})
28+
).data[0].number;
29+
}
30+
result-encoding: string
31+
32+
link-dev-website:
33+
needs: [get_issue_number]
34+
runs-on: ubuntu-22.04
35+
continue-on-error: true
36+
steps:
37+
- name: Link Dev Website
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
uses: unsplash/comment-on-pr@b5610c6125a7197eaec80072ea35ef53e1fc6035
41+
with:
42+
msg: |
43+
Deployed URL: https://cpt-ui-pr-${{ needs.get_issue_number.outputs.issue_number }}.dev.eps.national.nhs.uk/site

.github/workflows/pr-link.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ env:
88
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
99

1010
jobs:
11+
dependabot-auto-approve-and-merge:
12+
needs: quality_checks
13+
uses: NHSDigital/eps-common-workflows/.github/workflows/dependabot-auto-approve-and-merge.yml@a7daff06de7b695f601d9b1723ca184daca7d898
14+
secrets:
15+
AUTOMERGE_APP_ID: ${{ secrets.AUTOMERGE_APP_ID }}
16+
AUTOMERGE_PEM: ${{ secrets.AUTOMERGE_PEM }}
1117
get_asdf_version:
1218
runs-on: ubuntu-22.04
1319
outputs:
1420
asdf_version: ${{ steps.asdf-version.outputs.version }}
1521
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
1622
steps:
1723
- name: Checkout code
18-
uses: actions/checkout@v5
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
1925

2026
- name: Get asdf version
2127
id: asdf-version
@@ -32,7 +38,7 @@ jobs:
3238
commit_message: ${{ steps.commit_message.outputs.commit_message }}
3339
steps:
3440
- name: Checkout code
35-
uses: actions/checkout@v5
41+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
3642
with:
3743
ref: ${{ env.BRANCH_NAME }}
3844
fetch-depth: 0
@@ -44,7 +50,7 @@ jobs:
4450
quality_checks:
4551
# always run, but only block in the non-skip case
4652
needs: [get_commit_message, get_asdf_version]
47-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.5
53+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks.yml@a7daff06de7b695f601d9b1723ca184daca7d898
4854
with:
4955
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
5056
secrets:
@@ -57,7 +63,7 @@ jobs:
5763
steps:
5864
- name: Wait for quality checks to succeed
5965
if: ${{ ! contains(needs.get_commit_message.outputs.commit_message, '#skip-qc') }}
60-
uses: actions/github-script@v8
66+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
6167
with:
6268
github-token: ${{ secrets.GITHUB_TOKEN }}
6369
result-encoding: json
@@ -114,15 +120,15 @@ jobs:
114120
run: echo "Skipping QC gate per commit message."
115121

116122
pr_title_format_check:
117-
uses: NHSDigital/eps-workflow-semantic-release/.github/workflows/pr_title_check.yml@f3d071da30cd01dc0e4472ac0e2d7452db78d1c7
123+
uses: NHSDigital/eps-common-workflows/.github/workflows/pr_title_check.yml@a7daff06de7b695f601d9b1723ca184daca7d898
118124

119125
get_issue_number:
120126
runs-on: ubuntu-22.04
121127
outputs:
122128
issue_number: ${{steps.get_issue_number.outputs.result}}
123129

124130
steps:
125-
- uses: actions/github-script@v8
131+
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd
126132
name: get issue number
127133
id: get_issue_number
128134
with:
@@ -144,7 +150,7 @@ jobs:
144150

145151
tag_release:
146152
needs: [get_asdf_version]
147-
uses: NHSDigital/eps-workflow-semantic-release/.github/workflows/tag-release.yml@f3d071da30cd01dc0e4472ac0e2d7452db78d1c7
153+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@a7daff06de7b695f601d9b1723ca184daca7d898
148154
with:
149155
dry_run: true
150156
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
tag_format: ${{ steps.load-config.outputs.TAG_FORMAT }}
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
1818

1919
- name: Get asdf version
2020
id: asdf-version
@@ -25,7 +25,7 @@ jobs:
2525
TAG_FORMAT=$(yq '.TAG_FORMAT' .github/config/settings.yml)
2626
echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
2727
quality_checks:
28-
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v5.1.5
28+
uses: NHSDigital/eps-common-workflows/.github/workflows/quality-checks.yml@a7daff06de7b695f601d9b1723ca184daca7d898
2929
needs: [get_asdf_version]
3030
with:
3131
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}
@@ -44,7 +44,7 @@ jobs:
4444
4545
tag_release:
4646
needs: [quality_checks, get_commit_id, get_asdf_version]
47-
uses: NHSDigital/eps-workflow-semantic-release/.github/workflows/tag-release.yml@f3d071da30cd01dc0e4472ac0e2d7452db78d1c7
47+
uses: NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@a7daff06de7b695f601d9b1723ca184daca7d898
4848
with:
4949
dry_run: false
5050
asdfVersion: ${{ needs.get_asdf_version.outputs.asdf_version }}

0 commit comments

Comments
 (0)