name: Build image on: pull_request: push: branches: - main jobs: build: runs-on: hetzner steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: github-server-url: https://code.mor.re - name: Set up QEMU uses: https://github.com/docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Set up Docker Buildx id: buildx uses: https://github.com/docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - name: Login to registry if: github.event_name != 'pull_request' uses: https://github.com/docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 with: registry: code.mor.re username: ${{ github.repository_owner }} password: ${{ secrets.REGISTRY_TOKEN }} - name: Docker meta id: meta uses: https://github.com/docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4.6.0 with: flavor: | latest=false images: | code.mor.re/${{ github.repository }} - name: Build and push uses: https://github.com/docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4.1.1 with: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}