From 2f23f41ae76e7a6481f9923ca5d992b62619e183 Mon Sep 17 00:00:00 2001 From: ryuupendragon Date: Fri, 4 Jul 2025 15:40:58 +0530 Subject: [PATCH] Build using Gitea runners --- .github/workflows/docker-publish.yml | 48 +++++++++++++++++++++------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a0b7fc8..b04c6b8 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -8,27 +8,53 @@ on: - '**/README.md' jobs: - docker-build-and-publish: - runs-on: ubuntu-latest + build: + strategy: + matrix: + config: + - {arch: 'arm64'} + - {arch: 'amd64'} + runs-on: ${{ matrix.config.arch == 'arm64' && 'ubuntu-arm64' || 'ubuntu-amd64' }} steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push + - name: Build and Push Docker images for all Container Registries uses: docker/build-push-action@v6 with: - platforms: linux/amd64,linux/arm64/v8,linux/arm/v7 + tags: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-${{matrix.config.arch}}, ${{ vars.DOCKERHUB_REPO }}:latest-${{matrix.config.arch}} + file: Dockerfile push: true - tags: ${{ vars.DOCKERHUB_REPO }}:2.10.0 , ${{ vars.DOCKERHUB_REPO }}:latest + + merge-docker-manifest: + runs-on: ubuntu-latest + needs: build + steps: + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Create and push manifest images for pinned + uses: Noelware/docker-manifest-action@v1 + with: + inputs: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-arm64,${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }}-amd64 + tags: ${{ vars.DOCKERHUB_REPO }}:${{ vars.VERSION }} + push: true + + - name: Create and push manifest images for latest + uses: Noelware/docker-manifest-action@v1 + with: + inputs: ${{ vars.DOCKERHUB_REPO }}:latest-arm64,${{ vars.DOCKERHUB_REPO }}:latest-amd64 + tags: ${{ vars.DOCKERHUB_REPO }}:latest + push: true