feat: prepare for gitea actions
All checks were successful
Build / build (pull_request) Successful in 57s

- add actions workflow
- add makefile with build/clean targets
- add .gitignore file
- update pre-commit hooks
This commit is contained in:
Ben Vincent 2024-11-17 19:55:36 +11:00
parent d2abbda668
commit b218b4ef4e
3 changed files with 38 additions and 0 deletions

View File

@ -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

View File

@ -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]

9
Makefile Normal file
View File

@ -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