Skip to content

Commit 31ca501

Browse files
committed
update ubuntu version to 22 #527
1 parent f21d3b2 commit 31ca501

1 file changed

Lines changed: 42 additions & 34 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- main
88
jobs:
99
tests:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
strategy:
1212
fail-fast: false
1313
matrix:
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup Java
2222
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
2323
with:
24-
distribution: 'temurin'
24+
distribution: "temurin"
2525
java-version: 8
2626
- name: Setup Python
2727
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
@@ -138,7 +138,7 @@ jobs:
138138
- name: Create search_api_mapping.json
139139
run: cp datagateway_api/search_api_mapping.json.example datagateway_api/search_api_mapping.json
140140

141-
# See comment in noxfile.py for explanation regarding this step
141+
# See comment in noxfile.py for explanation regarding this step
142142
- name: Downgrade setuptools
143143
run: poetry run pip install --upgrade setuptools==70.0.0
144144
if: matrix.python-version == '3.8' || matrix.python-version == '3.9' || matrix.python-version == '3.10'
@@ -158,7 +158,7 @@ jobs:
158158
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
159159

160160
linting:
161-
runs-on: ubuntu-20.04
161+
runs-on: ubuntu-22.04
162162
name: Linting
163163
steps:
164164
- name: Setup Python
@@ -178,7 +178,7 @@ jobs:
178178
run: nox -s lint
179179

180180
formatting:
181-
runs-on: ubuntu-20.04
181+
runs-on: ubuntu-22.04
182182
name: Code Formatting
183183
steps:
184184
- name: Setup Python
@@ -198,7 +198,7 @@ jobs:
198198
run: nox -s black
199199

200200
safety:
201-
runs-on: ubuntu-20.04
201+
runs-on: ubuntu-22.04
202202
name: Dependency Safety
203203
steps:
204204
- name: Setup Python
@@ -218,7 +218,7 @@ jobs:
218218
run: nox -s safety
219219

220220
generator-script-testing:
221-
runs-on: ubuntu-20.04
221+
runs-on: ubuntu-22.04
222222
continue-on-error: true
223223
name: icatdb Generator Script Consistency Test
224224
steps:
@@ -229,7 +229,7 @@ jobs:
229229
- name: Setup Java
230230
uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
231231
with:
232-
distribution: 'temurin'
232+
distribution: "temurin"
233233
java-version: 8
234234
- name: Setup Python
235235
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
@@ -372,7 +372,7 @@ jobs:
372372
run: diff -s ~/generator_script_dump_main.sql ~/generator_script_dump_1.sql
373373

374374
pip-install-testing:
375-
runs-on: ubuntu-20.04
375+
runs-on: ubuntu-22.04
376376
strategy:
377377
fail-fast: false
378378
matrix:
@@ -422,30 +422,38 @@ jobs:
422422
# This job triggers only if all the other jobs succeed and does different things depending on the context.
423423
# The job builds the Docker image in all cases and also pushes the image to Harbor only if something is
424424
# pushed to the main branch.
425-
needs: [tests, linting, formatting, safety, generator-script-testing, pip-install-testing]
425+
needs:
426+
[
427+
tests,
428+
linting,
429+
formatting,
430+
safety,
431+
generator-script-testing,
432+
pip-install-testing,
433+
]
426434
name: Docker
427-
runs-on: ubuntu-20.04
435+
runs-on: ubuntu-22.04
428436
steps:
429-
- name: Check out repo
430-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v3.5.3
431-
432-
- name: Login to Harbor
433-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
434-
with:
435-
registry: harbor.stfc.ac.uk/datagateway
436-
username: ${{ secrets.HARBOR_USERNAME }}
437-
password: ${{ secrets.HARBOR_TOKEN }}
438-
439-
- name: Extract metadata (tags, labels) for Docker
440-
id: meta
441-
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
442-
with:
443-
images: harbor.stfc.ac.uk/datagateway/datagateway-api
444-
445-
- name: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'Build and push Docker image to Harbor' || 'Build Docker image' }}
446-
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
447-
with:
448-
context: .
449-
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
450-
tags: ${{ steps.meta.outputs.tags }}
451-
labels: ${{ steps.meta.outputs.labels }}
437+
- name: Check out repo
438+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v3.5.3
439+
440+
- name: Login to Harbor
441+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
442+
with:
443+
registry: harbor.stfc.ac.uk/datagateway
444+
username: ${{ secrets.HARBOR_USERNAME }}
445+
password: ${{ secrets.HARBOR_TOKEN }}
446+
447+
- name: Extract metadata (tags, labels) for Docker
448+
id: meta
449+
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
450+
with:
451+
images: harbor.stfc.ac.uk/datagateway/datagateway-api
452+
453+
- name: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && 'Build and push Docker image to Harbor' || 'Build Docker image' }}
454+
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
455+
with:
456+
context: .
457+
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
458+
tags: ${{ steps.meta.outputs.tags }}
459+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)