name: Build image on: pull_request: push: branches: - main jobs: build: runs-on: hetzner steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: github-server-url: https://code.mor.re - name: Set up QEMU uses: https://github.com/docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 - name: Set up Docker Buildx id: buildx uses: https://github.com/docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0 - name: Login to registry if: github.event_name != 'pull_request' uses: https://github.com/docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.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@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0 with: flavor: | latest=false images: | code.mor.re/${{ github.repository }} - name: Build and push uses: https://github.com/docker/build-push-action@1dc73863535b631f98b2378be8619f83b136f4a0 # v6.17.0 with: platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}