Merge pull request 'feat: prepare for gitea actions' (#1) from neoloc/actions into master

Reviewed-on: https://git.query.consul/unkin/puppet-r10k/pulls/1
This commit is contained in:
Ben Vincent 2024-11-17 20:01:24 +11:00
commit 1b76f03ba3
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