CUB-CI: Consolidate CI — switch to ubuntu-latest with manual Go/Node install
- 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)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user