Skip to content

chore(deps): bump actions/setup-node from 4 to 6 #70

chore(deps): bump actions/setup-node from 4 to 6

chore(deps): bump actions/setup-node from 4 to 6 #70

Workflow file for this run

name: CI / Build and Push
on:
push:
branches: [main]
paths-ignore:
- "README.md"
- "CLAUDE.md"
- "config.yaml.example"
- "docs/**"
- "LICENSE"
pull_request:
branches: [main]
paths-ignore:
- "README.md"
- "CLAUDE.md"
- "config.yaml.example"
- "docs/**"
- "LICENSE"
jobs:
go-checks:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Prepare web/dist placeholder for go:embed
run: mkdir -p web/dist && touch web/dist/.gitkeep
- name: go vet
run: go vet ./...
- name: go test
run: go test ./...
- name: go test -race -short
run: go test -race -short ./...
env:
CGO_ENABLED: "1"
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.11.4
frontend-checks:
runs-on: self-hosted
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: "20"
- name: npm ci
run: npm ci
- name: npm run lint
run: npm run lint
- name: npm run test
run: npm run test --if-present
- name: npm run build
run: npm run build
- name: npm audit
run: npm audit --audit-level=high
build:
runs-on: self-hosted
needs: [go-checks, frontend-checks]
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Set short SHA
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> "$GITHUB_ENV"
- name: Build image
run: |
docker build \
-t ${{ vars.REGISTRY }}/contextmatrix:${{ env.SHORT_SHA }} \
-t ${{ vars.REGISTRY }}/contextmatrix:latest \
.
- name: Push image
run: |
docker push ${{ vars.REGISTRY }}/contextmatrix:${{ env.SHORT_SHA }}
docker push ${{ vars.REGISTRY }}/contextmatrix:latest
- name: Clean up
if: always()
run: docker image prune -f