Update CI workflow by integrating Task
This commit is contained in:
@@ -17,23 +17,37 @@ jobs:
|
||||
with:
|
||||
node-version: 22
|
||||
cache: pnpm
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
- name: Setup Task
|
||||
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
||||
- name: Setup environment
|
||||
run: task setup
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
run: task install:ci
|
||||
- name: Frontend checks
|
||||
run: bash scripts/check.sh
|
||||
run: task check
|
||||
- name: Build frontend
|
||||
run: bash scripts/build.sh
|
||||
run: task build:frontend
|
||||
- name: Upload frontend assets
|
||||
uses: https://git.quad4.io/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
|
||||
with:
|
||||
name: frontend-build
|
||||
path: build/
|
||||
|
||||
lint-backend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://git.quad4.io/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
- name: Setup Go
|
||||
uses: https://git.quad4.io/actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
|
||||
with:
|
||||
go-version: '1.25.5'
|
||||
- name: Run gosec security scan
|
||||
uses: https://git.quad4.io/actions/gosec@424fc4cd9c82ea0fd6bee9cd49c2db2c3cc0c93f # v2.22.11
|
||||
|
||||
build-backend:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-frontend
|
||||
needs: [build-frontend, lint-backend]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://git.quad4.io/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
||||
@@ -46,7 +60,7 @@ jobs:
|
||||
uses: https://git.quad4.io/actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
|
||||
with:
|
||||
go-version: '1.25.5'
|
||||
- name: Setup Task
|
||||
uses: https://git.quad4.io/actions/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1
|
||||
- name: Build backend
|
||||
run: |
|
||||
mkdir -p bin
|
||||
CGO_ENABLED=0 go build -ldflags="-s -w" -o bin/linking-tool main.go
|
||||
run: task build:backend
|
||||
|
||||
Reference in New Issue
Block a user