From 178531ed8a25441fedc3b8ad754a767a2ba76ed0 Mon Sep 17 00:00:00 2001 From: kappa Date: Sat, 7 Feb 2026 22:32:16 +0900 Subject: [PATCH] ci: Simplify workflow for act_runner Docker environment Remove buildx action and test job, use direct docker build/push and mounted kubectl for k8s deployment. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/ci.yml | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5c53ca3..db2ac47 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -7,38 +7,12 @@ on: branches: [main] jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install uv - run: pip install uv - - - name: Install dependencies - run: uv pip install --system -e "haproxy_mcp[dev]" || uv pip install --system -e haproxy_mcp - - - name: Lint with ruff - run: ruff check . || true - - - name: Type check - run: mypy . --ignore-missing-imports || true - build-and-deploy: - needs: test if: github.event_name == 'push' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - name: Login to Gitea Registry run: echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login gitea.anvil.it.com -u "${{ secrets.REGISTRY_USERNAME }}" --password-stdin @@ -46,27 +20,25 @@ jobs: run: | IMAGE=gitea.anvil.it.com/kaffa/haproxy-mcp TAG=${GITHUB_SHA::8} - docker buildx build \ - --platform linux/amd64 \ + docker build \ --tag ${IMAGE}:${TAG} \ --tag ${IMAGE}:latest \ - --push \ . + docker push ${IMAGE}:${TAG} + docker push ${IMAGE}:latest - name: Deploy to K8s - env: - KUBECONFIG_DATA: ${{ secrets.KUBECONFIG }} run: | mkdir -p ~/.kube - echo "${KUBECONFIG_DATA}" | base64 -d > ~/.kube/config + echo "${{ secrets.KUBECONFIG }}" | base64 -d > ~/.kube/config chmod 600 ~/.kube/config IMAGE=gitea.anvil.it.com/kaffa/haproxy-mcp TAG=${GITHUB_SHA::8} + kubectl apply -f k8s/ kubectl set image deployment/haproxy-mcp \ haproxy-mcp=${IMAGE}:${TAG} \ -n default - kubectl rollout status deployment/haproxy-mcp \ -n default --timeout=120s