39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
---
|
|
when:
|
|
event: [push, tag]
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git@sha256:7af90de3a9aa5dc93cc0d5cd2e67e28cb237d4b8e891ccacfd9031f78f4b05a8
|
|
settings:
|
|
skip_verify: true
|
|
steps:
|
|
"prepare:commitlint":
|
|
image: bitnami/git:2.43.0@sha256:3932583adf73c9e7e75232c0a3637fb0ff7833d7a81c858e74468df0dbd89cf1
|
|
commands:
|
|
- git log -1 --pretty=%B >> commitlint.txt
|
|
|
|
"lint:commitlint":
|
|
image: node:lts-slim
|
|
depends_on: ["prepare:commitlint"]
|
|
commands:
|
|
- npm install --save-dev conventional-changelog-conventionalcommits @commitlint/config-conventional commitlint@latest
|
|
- cat commitlint.txt
|
|
- cat commitlint.txt | npx commitlint
|
|
when:
|
|
- branch: [main, dev]
|
|
event: push
|
|
"lint:precommit":
|
|
image: python:3.12.1-bullseye@sha256:2d5f7c8645d454ef5bbfebec83df0f2624fb3d47ea47920484c6d140835c4cdb
|
|
commands:
|
|
- pip install pre-commit
|
|
- pre-commit install
|
|
- pre-commit run --all-files
|
|
"lint:credentials":
|
|
image: ghcr.io/gitleaks/gitleaks:latest@sha256:6945c62ca019ead32bc337ab0c9fd055e98d82961765d38b7ccccc84dae95d0f
|
|
commands:
|
|
- export HOME=/home/gitleaks
|
|
- gitleaks detect
|
|
when:
|
|
- branch: [main, dev]
|
|
event: push
|