Merge branch 'dev' into agent/dex/CUB-207-event-sync-tests-v2
Some checks failed
Dev Build & Deploy / test-and-build (pull_request) Failing after 14m36s
Dev Build & Deploy / docker-build-push (pull_request) Blocked by required conditions

This commit is contained in:
2026-05-20 12:24:40 -04:00
2 changed files with 14 additions and 87 deletions

View File

@@ -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
}
})

View File

@@ -7,17 +7,29 @@ on:
branches: [dev] branches: [dev]
env: env:
GO_VERSION: "1.23"
NODE_VERSION: "22"
REGISTRY: code.cubecraftcreations.com REGISTRY: code.cubecraftcreations.com
BACKEND_IMAGE: ${{ gitea.repository }}/backend BACKEND_IMAGE: ${{ gitea.repository }}/backend
FRONTEND_IMAGE: ${{ gitea.repository }}/frontend FRONTEND_IMAGE: ${{ gitea.repository }}/frontend
jobs: jobs:
test-and-build: test-and-build:
runs-on: go-react runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - 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 - name: Run backend tests
run: go test ./... run: go test ./...
working-directory: ./go-backend working-directory: ./go-backend
@@ -41,7 +53,7 @@ jobs:
docker-build-push: docker-build-push:
needs: test-and-build needs: test-and-build
if: gitea.event_name == 'push' if: gitea.event_name == 'push'
runs-on: go-react runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4