name: Docker Image CI on: push: branches: [ "main", "dev" ] tags: ['v*'] jobs: build: runs-on: ubuntu-latest env: ImageOS: ubuntu20 steps: - name: Docker meta id: meta uses: docker/metadata-action@v4 with: images: ghcr.io/claperco/claper tags: | type=ref,event=branch type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - uses: actions/checkout@v3 - name: Set up QEMU id: qemu uses: docker/setup-qemu-action@v1 with: image: tonistiigi/binfmt:latest platforms: all - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 with: buildkitd-flags: --debug driver-opts: image=moby/buildkit:v0.9.1 - name: Log in to registry # This is where you will update the PAT to GITHUB_TOKEN run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin - name: Build and push Docker image # You may pin to the exact commit or the version. # uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | BUILD_METADATA=${{ steps.meta.outputs.json }} ERL_FLAGS=+JPperf true