diff --git a/.gitea/workflows/release-docker.yaml b/.gitea/workflows/release-docker.yaml index 33af4ab..102f528 100644 --- a/.gitea/workflows/release-docker.yaml +++ b/.gitea/workflows/release-docker.yaml @@ -7,30 +7,32 @@ on: jobs: build-and-push: runs-on: ubuntu-latest + steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Set up QEMU - uses: actions/setup-qemu-action@v3 + - name: Enable QEMU for multi-arch builds + run: | + docker run --privileged --rm tonistiigi/binfmt --install all - - name: Set up Docker Buildx - uses: actions/setup-buildx-action@v3 + - name: Create and use Docker Buildx builder + run: | + docker buildx create --name miauinv-builder --use || docker buildx use miauinv-builder + docker buildx inspect --bootstrap - name: Log in to Gitea Container Registry - uses: docker/login-action@v3 - with: - registry: git.miaurizius.de - username: ${{ gitea.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.miaurizius.de \ + --username "${{ gitea.actor }}" \ + --password-stdin - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - file: ./Dockerfile - push: true - platforms: linux/amd64,linux/arm64 - tags: | - git.miaurizius.de/${{ gitea.repository }}:latest - git.miaurizius.de/${{ gitea.repository }}:${{ gitea.event.release.tag_name }} \ No newline at end of file + - name: Build and push multi-arch Docker image + run: | + docker buildx build \ + --platform linux/amd64,linux/arm64 \ + --file ./Dockerfile \ + --tag git.miaurizius.de/${{ gitea.repository }}:latest \ + --tag git.miaurizius.de/${{ gitea.repository }}:${{ gitea.event.release.tag_name }} \ + --push \ + . \ No newline at end of file