-
Notifications
You must be signed in to change notification settings - Fork 181
48 lines (45 loc) · 1.45 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: docker build
on:
push:
branches: [ master ]
tags:
- '*'
release:
types: [ released ]
workflow_dispatch:
env:
QEMU_PLATFORMS: arm64
IMAGE_PLATFORMS: linux/amd64,linux/arm64
IMAGE_PREFIX: ${{ secrets.DOCKERHUB_PREFIX }}
jobs:
docker:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt install -yq python3-pip python3-setuptools-scm
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${QEMU_PLATFORMS}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build amd64 docker image and validate
run: |
./dockerfiles/build.sh --load
docker compose -f dockerfiles/staging/docker-compose.yml up --exit-code-from client client
docker compose -f dockerfiles/staging/docker-compose.yml down
docker images
- name: Build, tag and push latest image for all platforms
run: ./dockerfiles/build.sh --platform ${IMAGE_PLATFORMS} --push
- name: Tag and push release image for all platforms
if: startsWith(github.ref, 'refs/tags')
env:
IMAGE_TAG: ${{ github.ref_name }}
run: ./dockerfiles/build.sh --platform ${IMAGE_PLATFORMS} --push