Skip to content

Commit 354cc1f

Browse files
Merge pull request #3036 from UKHSA-Internal/task/CDD-3112-be-docker-build-check
CDD-3112: Add backend Docker image build checkt PR pipeline
2 parents 5023e6d + 9ecba99 commit 354cc1f

1 file changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/actions.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Pipeline
22

3-
on: push
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- '*'
410

511
env:
612
APIENV: "LOCAL"
@@ -172,6 +178,23 @@ jobs:
172178
source uhd.sh
173179
uhd tests coverage
174180
181+
###############################################################################
182+
# Docker build check (PR validation)
183+
###############################################################################
184+
185+
docker-build-check:
186+
name: Docker Build Check
187+
needs: [build]
188+
runs-on: ubuntu-22.04-arm
189+
steps:
190+
- uses: actions/checkout@v4
191+
192+
- name: Build main API Docker image
193+
run: docker build -t be-main-test -f Dockerfile .
194+
195+
- name: Build ingestion Docker image
196+
run: docker build -t be-ingestion-test -f Dockerfile-ingestion .
197+
175198
###############################################################################
176199
# Build image
177200
###############################################################################
@@ -187,7 +210,8 @@ jobs:
187210
test-coverage,
188211
dependency-checks,
189212
vulnerability-checks,
190-
architecture-checks
213+
architecture-checks,
214+
docker-build-check
191215
]
192216
runs-on: ubuntu-22.04-arm
193217
if: ${{ github.ref == 'refs/heads/main' }}
@@ -212,7 +236,8 @@ jobs:
212236
test-coverage,
213237
dependency-checks,
214238
vulnerability-checks,
215-
architecture-checks
239+
architecture-checks,
240+
docker-build-check
216241
]
217242
runs-on: ubuntu-22.04-arm
218243
if: ${{ github.ref == 'refs/heads/main' }}

0 commit comments

Comments
 (0)