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 - uses: docker/setup-compose-action@v1 with: version: latest - 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