fix: enforce lint failures and avoid cache warnings

- Make lint steps fail the pipeline so issues block merges
- Skip Node cache setup when the frontend lockfile is missing
- Cancel older CI runs for the same ref to reduce queue delays
This commit is contained in:
GitHub Actions
2026-02-08 05:56:48 +00:00
parent 4efd73d3e5
commit 5d4699d11e

View File

@@ -30,7 +30,7 @@ on:
type: boolean
concurrency:
group: ci-manual-pipeline-${{ github.ref_name }}-${{ github.run_id }}
group: ci-manual-pipeline-${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
@@ -77,20 +77,35 @@ jobs:
version: latest
working-directory: backend
args: --timeout=5m
continue-on-error: true
- name: GORM Security Scanner
run: |
chmod +x scripts/scan-gorm-security.sh
./scripts/scan-gorm-security.sh --check
- name: Set up Node.js
- name: Check frontend lockfile
id: frontend-lockfile
run: |
if [ -f frontend/package-lock.json ]; then
echo "present=true" >> "$GITHUB_OUTPUT"
else
echo "present=false" >> "$GITHUB_OUTPUT"
fi
- name: Set up Node.js (with cache)
if: steps.frontend-lockfile.outputs.present == 'true'
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Set up Node.js
if: steps.frontend-lockfile.outputs.present != 'true'
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
@@ -98,7 +113,6 @@ jobs:
- name: Run frontend lint
working-directory: frontend
run: npm run lint
continue-on-error: true
build-image:
name: Build and Publish Image