Debian Codegraph @

.github/workflows/docker.yml

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