88 BRANCH_NAME : ${{ github.event.ref.BRANCH_NAME }}
99
1010jobs :
11+ get_asdf_version :
12+ runs-on : ubuntu-22.04
13+ outputs :
14+ asdf_version : ${{ steps.asdf-version.outputs.version }}
15+ tag_format : ${{ steps.load-config.outputs.TAG_FORMAT }}
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
19+
20+ - name : Get asdf version
21+ id : asdf-version
22+ run : echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT"
23+ - name : Load config value
24+ id : load-config
25+ run : |
26+ TAG_FORMAT=$(yq '.TAG_FORMAT' .github/cfg/settings.yml)
27+ echo "TAG_FORMAT=$TAG_FORMAT" >> "$GITHUB_OUTPUT"
28+
1129 quality_checks :
12- uses :
NHSDigital/eps-workflow-quality-checks/.github/workflows/[email protected] 30+ uses : NHSDigital/eps-common-workflows/.github/workflows/quality-checks.yml@4fb41faab9c92d8a1444719bc1ab45a989caf756
31+ needs : [get_asdf_version]
32+ with :
33+ asdfVersion : ${{ needs.get_asdf_version.outputs.asdf_version }}
1334 secrets :
1435 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
1536
@@ -24,69 +45,15 @@ jobs:
2445 echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
2546
2647 tag_release :
27- needs : quality_checks
28- runs-on : ubuntu-22.04
29- outputs :
30- version_tag : ${{steps.output_version_tag.outputs.VERSION_TAG}}
31- steps :
32- - name : Checkout code
33- uses : actions/checkout@v5
34- with :
35- ref : ${{ env.BRANCH_NAME }}
36- fetch-depth : 0
37-
38- # using git commit sha for version of action to ensure we have stable version
39- - name : Install asdf
40- uses : asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
41- with :
42- asdf_branch : v0.11.3
43-
44- - name : Cache asdf
45- uses : actions/cache@v4
46- with :
47- path : |
48- ~/.asdf
49- key : ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
50- restore-keys : |
51- ${{ runner.os }}-asdf-
52-
53- - name : Install asdf dependencies in .tool-versions
54- uses : asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
55- with :
56- asdf_branch : v0.11.3
57- env :
58- PYTHON_CONFIGURE_OPTS : --enable-shared
59-
60- - name : Install node packages
61- run : |
62- make install-node
63-
64- - name : Set VERSION_TAG env var to be short git SHA and get next tag varsion
65- id : output_version_tag
66- run : |
67- VERSION_TAG=$(git rev-parse --short HEAD)
68- npx semantic-release --dry-run > semantic-release-output.log
69- NEXT_VERSION=$(grep -i 'The next release version is' semantic-release-output.log | sed -E 's/.* ([[:digit:].]+)$/\1/')
70- if [ -z "${NEXT_VERSION}" ]
71- then
72- echo "Could not get next tag. Here is the log from semantic-release"
73- cat semantic-release-output.log
74- exit 1
75- fi
76- tagFormat=$(node -e "const config=require('./release.config.js'); console.log(config.tagFormat)")
77- if [ "${tagFormat}" = "null" ]
78- then
79- tagFormat="v\${version}"
80- fi
81- # disabling shellcheck as replace does not work
82- # shellcheck disable=SC2001
83- NEW_VERSION_TAG=$(echo "$tagFormat" | sed "s/\${version}/$NEXT_VERSION/")
84- echo "## VERSION TAG : ${VERSION_TAG}" >> "$GITHUB_STEP_SUMMARY"
85- echo "## NEXT TAG WILL BE : ${NEW_VERSION_TAG}" >> "$GITHUB_STEP_SUMMARY"
86- echo "VERSION_TAG=${VERSION_TAG}" >> "$GITHUB_OUTPUT"
87- echo "VERSION_TAG=${VERSION_TAG}" >> "$GITHUB_ENV"
88- env :
89- GITHUB_TOKEN : ${{ github.token }}
48+ needs : [quality_checks, get_commit_id, get_asdf_version]
49+ uses : NHSDigital/eps-common-workflows/.github/workflows/tag-release.yml@3cba6a3733673bafc95526503478674332c26007
50+ with :
51+ dry_run : true
52+ asdfVersion : ${{ needs.get_asdf_version.outputs.asdf_version }}
53+ branch_name : main
54+ publish_package : false
55+ tag_format : ${{ needs.get_asdf_version.outputs.tag_format }}
56+ secrets : inherit
9057
9158 package_code :
9259 needs : tag_release
11784 RUN_REGRESSION_TEST : true
11885 STATE_MACHINE_LOG_LEVEL : ALL
11986 LOG_LEVEL : DEBUG
120- ENABLE_BACKUP : True
87+ ENABLE_BACKUP : " True"
12188 ENABLE_NOTIFICATIONS_INTERNAL : true
12289 ENABLE_NOTIFICATIONS_EXTERNAL : false
12390 ENABLED_SYSTEMS : " Internal Test System"
12693 NOTIFY_API_BASE_URL : " https://int.api.service.nhs.uk"
12794 MTLS_KEY : psu-mtls-1
12895 IS_PULL_REQUEST : false
96+ FORWARD_CSOC_LOGS : false
12997 secrets :
13098 CLOUD_FORMATION_DEPLOY_ROLE : ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
13199 DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE : ${{ secrets.DEV_CLOUD_FORMATION_CHECK_VERSION_ROLE }}
@@ -156,7 +124,7 @@ jobs:
156124 RUN_REGRESSION_TEST : false
157125 STATE_MACHINE_LOG_LEVEL : ALL
158126 LOG_LEVEL : DEBUG
159- ENABLE_BACKUP : False
127+ ENABLE_BACKUP : " False"
160128 ENABLE_NOTIFICATIONS_INTERNAL : false
161129 ENABLE_NOTIFICATIONS_EXTERNAL : false
162130 ENABLED_SYSTEMS : " Internal Test System"
@@ -165,6 +133,7 @@ jobs:
165133 NOTIFY_API_BASE_URL : " https://int.api.service.nhs.uk"
166134 MTLS_KEY : psu-mtls-1
167135 IS_PULL_REQUEST : false
136+ FORWARD_CSOC_LOGS : false
168137 secrets :
169138 REGRESSION_TESTS_PEM : ${{ secrets.REGRESSION_TESTS_PEM }}
170139 CLOUD_FORMATION_DEPLOY_ROLE : ${{ secrets.DEV_CLOUD_FORMATION_DEPLOY_ROLE }}
@@ -192,7 +161,7 @@ jobs:
192161 RUN_REGRESSION_TEST : true
193162 STATE_MACHINE_LOG_LEVEL : ALL
194163 LOG_LEVEL : DEBUG
195- ENABLE_BACKUP : False
164+ ENABLE_BACKUP : " False"
196165 ENABLE_NOTIFICATIONS_INTERNAL : false
197166 ENABLE_NOTIFICATIONS_EXTERNAL : false
198167 ENABLED_SYSTEMS : " Internal Test System"
@@ -201,6 +170,7 @@ jobs:
201170 NOTIFY_API_BASE_URL : " https://int.api.service.nhs.uk"
202171 MTLS_KEY : psu-mtls-1
203172 IS_PULL_REQUEST : false
173+ FORWARD_CSOC_LOGS : false
204174 secrets :
205175 REGRESSION_TESTS_PEM : ${{ secrets.REGRESSION_TESTS_PEM }}
206176 CLOUD_FORMATION_DEPLOY_ROLE : ${{ secrets.QA_CLOUD_FORMATION_DEPLOY_ROLE }}
0 commit comments