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@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2.2.0 - name: Set up Docker Buildx id: buildx uses: https://github.com/docker/setup-buildx-action@4c0219f9ac95b02789c1075625400b2acbff50b1 # v2.9.1 - 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@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1 with: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}