44 branches :
55 - develop
66
7- jobs :
7+ permissions :
8+ contents : write
9+ checks : write
10+ pull-requests : write
811
12+ jobs :
913 coverage :
1014 runs-on : ubuntu-latest
1115 if : github.repository == 'NHSDigital/mesh-sandbox'
1216 steps :
1317 - name : checkout
14- uses : actions/checkout@v3
18+ uses : actions/checkout@v5
1519 with :
1620 fetch-depth : 0
1721
@@ -33,19 +37,22 @@ jobs:
3337 - name : merge into base_branch
3438 if : ${{ github.event_name == 'pull_request' }}
3539 run : |
36- echo base branch "${{ github.base_ref }} "
37- echo pr branch "${{ github.head_ref }} "
38- git checkout "${{ github.base_ref }} "
40+ echo base branch "$BASE_BRANCH "
41+ echo pr branch "$PR_BRANCH "
42+ git checkout "$BASE_BRANCH "
3943 git checkout -b "merging-${{ github.event.number }}"
4044 git merge --ff-only "${{ github.event.pull_request.head.sha }}"
45+ env :
46+ BASE_BRANCH : ${{ github.base_ref }}
47+ PR_BRANCH : ${{ github.head_ref }}
4148
4249 - name : setup python
43- uses : actions/setup-python@v3
50+ uses : actions/setup-python@v5
4451 with :
45- python-version : " 3.9 "
52+ python-version-file : " pyproject.toml "
4653
4754 - name : setup poetry
48- uses : abatilo/actions-poetry@v2
55+ uses : abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
4956 with :
5057 poetry-version : 1.5.1
5158
5461 poetry self add "poetry-dynamic-versioning[plugin]"
5562
5663 - name : cache virtualenv
57- uses : actions/cache@v3
64+ uses : actions/cache@v4
5865 with :
5966 path : |
6067 .venv
7683
7784 - name : setup java
7885 if : success() || failure()
79- uses : actions/setup-java@v3
86+ uses : actions/setup-java@v5
8087 with :
8188 distribution : " corretto"
8289 java-version : " 11"
97104
98105 - name : setup java
99106 if : github.actor != 'dependabot[bot]' && (success() || failure())
100- uses : actions/setup-java@v3
107+ uses : actions/setup-java@v5
101108 with :
102109 distribution : " corretto"
103110 java-version : " 17"
@@ -134,7 +141,7 @@ jobs:
134141
135142 - name : publish junit reports
136143 if : success() || failure()
137- uses : mikepenz/action-junit-report@v3
144+ uses : mikepenz/action-junit-report@3585e9575db828022551b4231f165eb59a0e74e3
138145 with :
139146 check_name : junit reports
140147 report_paths : reports/junit/*.xml
@@ -148,7 +155,7 @@ jobs:
148155 if : github.repository == 'NHSDigital/mesh-sandbox'
149156 steps :
150157 - name : checkout
151- uses : actions/checkout@v3
158+ uses : actions/checkout@v5
152159 with :
153160 fetch-depth : 0
154161
@@ -162,19 +169,22 @@ jobs:
162169 - name : merge into base_branch
163170 if : ${{ github.event_name == 'pull_request' }}
164171 run : |
165- echo base branch "${{ github.base_ref }} "
166- echo pr branch "${{ github.head_ref }} "
167- git checkout "${{ github.base_ref }} "
172+ echo base branch "$BASE_BRANCH "
173+ echo pr branch "$PR_BRANCH "
174+ git checkout "$BASE_BRANCH "
168175 git checkout -b "merging-${{ github.event.number }}"
169176 git merge --ff-only "${{ github.event.pull_request.head.sha }}"
177+ env :
178+ BASE_BRANCH : ${{ github.base_ref }}
179+ PR_BRANCH : ${{ github.head_ref }}
170180
171181 - name : setup python
172- uses : actions/setup-python@v3
182+ uses : actions/setup-python@v5
173183 with :
174- python-version : " 3.9 "
184+ python-version-file : " pyproject.toml "
175185
176186 - name : setup poetry
177- uses : abatilo/actions-poetry@v2
187+ uses : abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
178188 with :
179189 poetry-version : 1.5.1
180190
@@ -183,7 +193,7 @@ jobs:
183193 poetry self add "poetry-dynamic-versioning[plugin]"
184194
185195 - name : cache virtualenv
186- uses : actions/cache@v3
196+ uses : actions/cache@v4
187197 with :
188198 path : |
189199 .venv
@@ -205,21 +215,20 @@ jobs:
205215 run : make mypy
206216
207217 - name : hadolint
208- uses : hadolint/hadolint-action@master
218+ uses : hadolint/hadolint-action@5d0317e9d0d2c15b383fbc7433e9d0aed07ec660
209219 with :
210220 dockerfile : " Dockerfile"
211221 recursive : true
212222 config : ./hadolint.yml
213223
214224 - name : shellcheck
215- uses : ludeeus/action-shellcheck@master
225+ uses : ludeeus/action-shellcheck@00b27aa7cb85167568cb48a3838b75f4265f2bca
216226 with :
217227 ignore_paths : .venv build
218228 ignore_names : git-secrets
219229 env :
220230 SHELLCHECK_OPTS : -f gcc -e SC1090,SC1091
221231
222-
223232 publish :
224233 runs-on : ubuntu-latest
225234 if : github.repository == 'NHSDigital/mesh-sandbox' && github.actor != 'dependabot[bot]'
@@ -228,7 +237,7 @@ jobs:
228237 - lint
229238 steps :
230239 - name : checkout
231- uses : actions/checkout@v3
240+ uses : actions/checkout@v5
232241 with :
233242 fetch-depth : 0
234243
@@ -247,19 +256,22 @@ jobs:
247256 - name : merge into base_branch
248257 if : ${{ github.event_name == 'pull_request' }}
249258 run : |
250- echo base branch "${{ github.base_ref }} "
251- echo pr branch "${{ github.head_ref }} "
252- git checkout "${{ github.base_ref }} "
259+ echo base branch "$BASE_BRANCH "
260+ echo pr branch "$PR_BRANCH "
261+ git checkout "$BASE_BRANCH "
253262 git checkout -b "merging-${{ github.event.number }}"
254263 git merge --ff-only "${{ github.event.pull_request.head.sha }}"
264+ env :
265+ BASE_BRANCH : ${{ github.base_ref }}
266+ PR_BRANCH : ${{ github.head_ref }}
255267
256268 - name : setup python
257- uses : actions/setup-python@v3
269+ uses : actions/setup-python@v5
258270 with :
259- python-version : " 3.9 "
271+ python-version-file : " pyproject.toml "
260272
261273 - name : setup poetry
262- uses : abatilo/actions-poetry@v2
274+ uses : abatilo/actions-poetry@0dd19c9498c3dc8728967849d0d2eae428a8a3d8
263275 with :
264276 poetry-version : 1.5.1
265277
@@ -268,7 +280,7 @@ jobs:
268280 poetry self add "poetry-dynamic-versioning[plugin]"
269281
270282 - name : cache virtualenv
271- uses : actions/cache@v3
283+ uses : actions/cache@v4
272284 with :
273285 path : |
274286 .venv
@@ -285,10 +297,11 @@ jobs:
285297 poetry build --format=wheel
286298
287299 - name : poetry config
300+ env :
301+ POETRY_PYPI_TOKEN_TESTPYPI : ${{ secrets.TEST_PYPI_TOKEN }}
288302 run : |
289303 poetry config repositories.testpypi https://test.pypi.org/legacy/
290- poetry config pypi-token.testpypi ${{ secrets.TEST_PYPI_TOKEN }}
304+ poetry config pypi-token.testpypi "$POETRY_PYPI_TOKEN_TESTPYPI"
291305
292306 - name : poetry test publish
293307 run : poetry publish -r testpypi
294-
0 commit comments