diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..8d0a1f7 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,24 @@ +name: Build + +on: + pull_request: + +jobs: + build: + runs-on: almalinux-8 + container: + image: git.query.consul/unkin/almalinux8:latest + options: --privileged + + steps: + - name: Set up environment + run: | + dnf module enable -y nodejs:20 + dnf install -y make bash git nodejs python3.11 + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Run pre-commit + run: | + make build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 94a84ff..f48e6d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,3 +8,8 @@ repos: "-d {extends: relaxed, rules: {line-length: disable}, ignore: chart}", "-s", ] + - repo: https://github.com/jorisroovers/gitlint + rev: v0.19.1 + hooks: + - id: gitlint + stages: [commit-msg] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4815a40 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +# run pre-commit +build: + python3.11 -m venv venv + venv/bin/pip install pip --upgrade + venv/bin/pip install pre-commit + venv/bin/pre-commit run --all-files + +clean: + rm -rf venv