Skip to content

Commit fe133a5

Browse files
committed
build the image
1 parent 6e8825f commit fe133a5

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

.gitallowed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
id-token: write
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and push docker image
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build_image:
8+
permissions:
9+
id-token: write
10+
runs-on: ${{ matrix.runner }}
11+
strategy:
12+
matrix:
13+
include:
14+
- arch: amd64
15+
runner: ubuntu-22.04
16+
- arch: arm64
17+
runner: ubuntu-22.04-arm
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Build container
25+
run: |
26+
make build-base-image
27+
docker tag ghcr.io/nhsdigital/eps-devcontainer-base:latest ghcr.io/nhsdigital/eps-devcontainer-base:latest-${{ matrix.arch }}
28+
docker save "ghcr.io/nhsdigital/eps-devcontainer-base:latest-${{ matrix.arch }}" -o eps-devcontainer-base-latest-${{ matrix.arch }}.img
29+
30+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
31+
name: Upload docker images
32+
with:
33+
name: eps-devcontainer-base-latest-${{ matrix.arch }}.img
34+
path: |
35+
eps-devcontainer-base-latest-${{ matrix.arch }}.img

.github/workflows/pull_request.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,8 @@ jobs:
9090
# echo "commit_id=${{ github.sha }}" >> "$GITHUB_ENV"
9191
echo "commit_id=${{ github.sha }}" >> "$GITHUB_OUTPUT"
9292
echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
93+
94+
95+
package_docker_image:
96+
needs: [get_issue_number, quality_checks, get_commit_id]
97+
uses: ./.github/workflows/build_multi_arch_image.yml

0 commit comments

Comments
 (0)