mirror of
https://github.com/Luzifer/stadt-land-fluss.git
synced 2024-12-20 14:51:16 +00:00
Add code linting
This commit is contained in:
parent
5c4c0eb62c
commit
6ba0fe4456
2 changed files with 35 additions and 0 deletions
27
.github/workflows/publish.yml
vendored
27
.github/workflows/publish.yml
vendored
|
@ -4,7 +4,34 @@ name: CI Workflow
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: luzifer/gh-arch-env
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
|
- name: Marking workdir safe
|
||||||
|
run: git config --global --add safe.directory /__w/stadt-land-fluss/stadt-land-fluss
|
||||||
|
|
||||||
|
- name: Lint code
|
||||||
|
run: make frontend_lint trivy
|
||||||
|
|
||||||
gh-page-publish:
|
gh-page-publish:
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
needs: [test]
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -14,3 +14,11 @@ frontend_lint: node_modules
|
||||||
|
|
||||||
node_modules:
|
node_modules:
|
||||||
npm ci --include dev
|
npm ci --include dev
|
||||||
|
|
||||||
|
trivy:
|
||||||
|
trivy fs . \
|
||||||
|
--dependency-tree \
|
||||||
|
--format table \
|
||||||
|
--quiet \
|
||||||
|
--scanners misconfig,license,secret,vuln \
|
||||||
|
--severity HIGH,CRITICAL
|
||||||
|
|
Loading…
Reference in a new issue