mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2026-03-25 22:17:25 +00:00
Run CI through prek on Arch
This commit is contained in:
47
.github/workflows/matrix.yml
vendored
47
.github/workflows/matrix.yml
vendored
@@ -9,34 +9,31 @@ name: Matrix CI
|
||||
|
||||
on: [push, pull_request] # yamllint disable-line rule:truthy
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
yamllint:
|
||||
name: yamllint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out
|
||||
uses: actions/checkout@v6
|
||||
- name: Run yamllint
|
||||
uses: frenck/action-yamllint@v1.5.0
|
||||
ansible-lint:
|
||||
name: ansible-lint
|
||||
prek:
|
||||
name: Run prek hooks
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/archlinux:base-devel
|
||||
|
||||
steps:
|
||||
# git must be installed before checkout so it does a proper clone
|
||||
# (with .git directory) instead of a tarball download.
|
||||
- name: Install git
|
||||
run: pacman -Sy --noconfirm git
|
||||
|
||||
- name: Check out
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Run ansible-lint
|
||||
uses: ansible/ansible-lint@v26.3.0
|
||||
with:
|
||||
args: "roles/custom"
|
||||
setup_python: "true"
|
||||
working_directory: ""
|
||||
requirements_file: requirements.yml
|
||||
precommit:
|
||||
name: Run pre-commit
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
- name: Run pre-commit
|
||||
uses: pre-commit/action@v3.0.1
|
||||
- name: Install dependencies
|
||||
run: pacman -S --noconfirm --needed just mise python
|
||||
|
||||
- name: Run prek hooks
|
||||
run: |
|
||||
# The checkout action sets safe.directory using its own bundled
|
||||
# git, which is separate from the pacman-installed git that prek uses.
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
just prek-run-on-all
|
||||
|
||||
Reference in New Issue
Block a user