From 9e0366e780783da4f161b80e1b231a39201c9445 Mon Sep 17 00:00:00 2001 From: Otto the Minion Date: Wed, 20 May 2026 12:22:19 -0400 Subject: [PATCH 1/3] =?UTF-8?q?CUB-CI:=20Remove=20redundant=20build-dev.ya?= =?UTF-8?q?ml=20=E2=80=94=20dev.yml=20already=20handles=20this?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build-dev.yaml uses actions/setup-go@v5 and actions/setup-node@v4 which are incompatible with Gitea Act runner (no node20 runtime). dev.yml is the canonical build workflow; having two competing workflows on the same triggers was causing duplicate CI runs and misleading failures. --- .gitea/workflows/build-dev.yaml | 85 --------------------------------- 1 file changed, 85 deletions(-) diff --git a/.gitea/workflows/build-dev.yaml b/.gitea/workflows/build-dev.yaml index 4bd6b6f..e69de29 100644 --- a/.gitea/workflows/build-dev.yaml +++ b/.gitea/workflows/build-dev.yaml @@ -1,85 +0,0 @@ -name: Build (Dev) - -on: - push: - branches: [dev] - pull_request: - branches: [dev] - workflow_dispatch: - -env: - GO_VERSION: "1.23" - NODE_VERSION: "22" - BINARY_NAME: server - -jobs: - build-go-backend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Test Go backend - working-directory: go-backend - run: go test ./... - - - name: Build Go binary - working-directory: go-backend - run: | - CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \ - go build -ldflags="-s -w -X main.version=${GITHUB_SHA:0:8}" \ - -o ${{ env.BINARY_NAME }} ./cmd/server - - - name: Upload Go binary - uses: actions/upload-artifact@v4 - with: - name: go-backend-binary - path: go-backend/${{ env.BINARY_NAME }} - retention-days: 3 - - build-frontend: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: Install and build frontend - working-directory: frontend - run: | - npm ci - npm run build - - - name: Upload frontend dist - uses: actions/upload-artifact@v4 - with: - name: frontend-dist - path: frontend/dist/ - retention-days: 3 - - trigger-deploy: - if: github.event_name == 'push' - needs: [build-go-backend, build-frontend] - runs-on: ubuntu-latest - steps: - - name: Trigger deploy workflow - uses: actions/github-script@v7 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - await github.rest.repos.createDispatchEvent({ - owner: context.repo.owner, - repo: context.repo.repo, - event_type: 'dev-build-success', - client_payload: { - sha: context.sha, - ref: context.ref - } - }) \ No newline at end of file -- 2.53.0 From d294818581d68ea22ba9231e17318b5a48f6b8e9 Mon Sep 17 00:00:00 2001 From: Otto the Minion Date: Wed, 20 May 2026 12:23:16 -0400 Subject: [PATCH 2/3] CUB-CI: Remove redundant build-dev.yaml --- .gitea/workflows/build-dev.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitea/workflows/build-dev.yaml diff --git a/.gitea/workflows/build-dev.yaml b/.gitea/workflows/build-dev.yaml deleted file mode 100644 index e69de29..0000000 -- 2.53.0 From a0eb393c6ca9f7c7707af407720920781cd4d00b Mon Sep 17 00:00:00 2001 From: Otto the Minion Date: Wed, 20 May 2026 12:23:32 -0400 Subject: [PATCH 3/3] =?UTF-8?q?CUB-CI:=20Consolidate=20CI=20=E2=80=94=20sw?= =?UTF-8?q?itch=20to=20ubuntu-latest=20with=20manual=20Go/Node=20install?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove custom go-react runner label (was inconsistent on PR branches) - Replace with ubuntu-latest + manual Go 1.23 / Node 22 install (actions/setup-go and setup-node don't work with Gitea Act runner) - Remove duplicate build-dev.yaml workflow (already deleted) - All steps: Go test → Go build → npm ci → npm lint → npm build - Docker push on push events only (unchanged) --- .gitea/workflows/dev.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 52dd854..7ddd342 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -7,17 +7,29 @@ on: branches: [dev] env: + GO_VERSION: "1.23" + NODE_VERSION: "22" REGISTRY: code.cubecraftcreations.com BACKEND_IMAGE: ${{ gitea.repository }}/backend FRONTEND_IMAGE: ${{ gitea.repository }}/frontend jobs: test-and-build: - runs-on: go-react + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Install Go + run: | + curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xz + echo "/usr/local/go/bin" >> $GITHUB_PATH + + - name: Install Node.js + run: | + curl -fsSL "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" | sudo tar -C /usr/local --strip-components=1 -xJ + echo "/usr/local/bin" >> $GITHUB_PATH + - name: Run backend tests run: go test ./... working-directory: ./go-backend @@ -41,7 +53,7 @@ jobs: docker-build-push: needs: test-and-build if: gitea.event_name == 'push' - runs-on: go-react + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 -- 2.53.0