From 2907466706b9def5950b7c9023a65c6af7193a69 Mon Sep 17 00:00:00 2001 From: HWANG BYUNGHA Date: Mon, 2 Feb 2026 23:49:22 +0900 Subject: [PATCH] Fix workflow to match cloud-api-emulator pattern - Use gitea.actor instead of github.actor - Use REGISTRY_TOKEN secret - Use direct docker build/push commands - Hardcode image name Co-Authored-By: Claude Opus 4.5 --- .gitea/workflows/build.yaml | 45 +++++++++++-------------------------- 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index abe7577..8023119 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,46 +1,27 @@ -name: Build Container Image +name: Build and Push Container on: push: - branches: [main] - workflow_dispatch: + branches: + - main env: REGISTRY: gitea.anvil.it.com - IMAGE_NAME: ${{ github.repository }} + IMAGE: kaffa/vultr-api jobs: - build: + build-amd64: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: Login to Registry + run: docker login ${{ env.REGISTRY }} -u ${{ gitea.actor }} -p ${{ secrets.REGISTRY_TOKEN }} - - name: Login to Gitea Container Registry - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITEA_TOKEN }} - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=sha - type=raw,value=latest,enable={{is_default_branch}} - - - name: Build and push image for amd64 - uses: docker/build-push-action@v5 - with: - context: . - file: ./server/Dockerfile - platforms: linux/amd64 - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + - name: Build and Push AMD64 + run: | + docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64 -f server/Dockerfile . + docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64 + docker tag ${{ env.REGISTRY }}/${{ env.IMAGE }}:amd64 ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest + docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:latest