From f0ecd9c2ce854e6edf126144251c7e18f6299706 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 24 Jul 2026 14:36:05 -0500 Subject: [PATCH] Use Kaniko for Docker builds --- .forgejo/workflows/release.yml | 37 +++++++++++++--------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 47ae53d..6876ba3 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -17,34 +17,25 @@ jobs: with: go-version-file: go.mod - - name: Set up QEMU - uses: https://github.com/docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: https://github.com/docker/setup-buildx-action@v3 - - - name: Log in to Container Registry - uses: https://github.com/docker/login-action@v3 - with: - registry: git.mcintire.me - username: graham - password: ${{ secrets.FORGEJO_TOKEN }} - - name: Extract version id: version run: echo "tag=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" - - name: Build and push Docker image - uses: https://github.com/docker/build-push-action@v6 + - name: Build and Push via Kaniko + uses: graham/infra/.forgejo/actions/kaniko-build@main with: - context: . - push: true - platforms: linux/amd64,linux/arm64 - build-args: | - VERSION=${{ steps.version.outputs.tag }} - tags: | - git.mcintire.me/${{ github.repository }}:latest - git.mcintire.me/${{ github.repository }}:${{ steps.version.outputs.tag }} + token: ${{ secrets.FORGEJO_TOKEN }} + image: git.mcintire.me/graham/towerops-agent + tag: ${{ steps.version.outputs.tag }} + extra_args: "--build-arg VERSION=${{ steps.version.outputs.tag }} --platform=linux/amd64 --platform=linux/arm64" + + - name: Tag as latest + uses: graham/infra/.forgejo/actions/kaniko-build@main + with: + token: ${{ secrets.FORGEJO_TOKEN }} + image: git.mcintire.me/graham/towerops-agent + tag: latest + extra_args: "" - name: Run tests run: go test -race -v -count=1 -timeout 60s ./...