From 4d55dabfda1f816081fb76dc2cab1b79cc0555b9 Mon Sep 17 00:00:00 2001 From: bagas Date: Wed, 3 Dec 2025 15:36:24 +0000 Subject: [PATCH] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 43 +++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index fd72b48..65b3509 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -8,42 +8,61 @@ on: jobs: build-and-push: - runs-on: - - linux - - ${{ matrix.arch }} - container: - image: docker.gitea.com/runner-images:ubuntu-latest + runs-on: gitea/runner-images:ubuntu-latest strategy: matrix: arch: [amd64, arm64] steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - - uses: docker/setup-buildx-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - uses: docker/login-action@v3 + - name: Log in to Docker registry + uses: docker/login-action@v3 with: registry: git.fossy.my.id username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build & Push (main) - if: github.ref == 'refs/heads/main' + - name: Build and Push per-arch uses: docker/build-push-action@v6 with: context: . + push: true + tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:${{ matrix.arch }} + platforms: linux/${{ matrix.arch }} + + multi-arch-manifest: + runs-on: ubuntu-latest + needs: build-and-push + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker registry + uses: docker/login-action@v3 + with: + registry: git.fossy.my.id + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Push Multi-arch Manifest for main + if: github.ref == 'refs/heads/main' + uses: docker/build-push-action@v6 + with: push: true tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:latest manifests: | git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:amd64 git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:arm64 - - name: Build & Push (staging) + - name: Push Multi-arch Manifest for staging if: github.ref == 'refs/heads/staging' uses: docker/build-push-action@v6 with: - context: . push: true tags: git.fossy.my.id/${{ secrets.DOCKER_USERNAME }}/tunnl_please:staging manifests: |