mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-12 01:13:01 +02:00
Compare commits
No commits in common. "731761f0fcb5a46335c200ada4f964d44b4e3d65" and "9db750e97c77fe3a33ddf744715d48e3d4c7c457" have entirely different histories.
731761f0fc
...
9db750e97c
4 changed files with 50 additions and 35 deletions
27
.forgejo/actions/prefligit/action.yml
Normal file
27
.forgejo/actions/prefligit/action.yml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: prefligit
|
||||||
|
description: |
|
||||||
|
Runs prefligit, pre-commit reimplemented in Rust.
|
||||||
|
inputs:
|
||||||
|
extra_args:
|
||||||
|
description: options to pass to pre-commit run
|
||||||
|
required: false
|
||||||
|
default: '--all-files'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Install uv
|
||||||
|
uses: https://github.com/astral-sh/setup-uv@v6
|
||||||
|
with:
|
||||||
|
enable-cache: true
|
||||||
|
ignore-nothing-to-cache: true
|
||||||
|
- name: Install Prefligit
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prefligit/releases/download/v0.0.10/prefligit-installer.sh | sh
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cache/prefligit
|
||||||
|
key: prefligit-0|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||||
|
- run: prefligit run --show-diff-on-failure --color=always -v ${{ inputs.extra_args }}
|
||||||
|
shell: bash
|
22
.forgejo/workflows/prefligit-checks.yml
Normal file
22
.forgejo/workflows/prefligit-checks.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
name: Checks / Prefligit
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prefligit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
FROM_REF: ${{ github.event.pull_request.base.sha || (!github.event.forced && ( github.event.before != '0000000000000000000000000000000000000000' && github.event.before || github.sha )) || format('{0}~', github.sha) }}
|
||||||
|
TO_REF: ${{ github.sha }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: ./.forgejo/actions/prefligit
|
||||||
|
with:
|
||||||
|
extra_args: --all-files --hook-stage manual
|
|
@ -1,34 +0,0 @@
|
||||||
name: Checks / Prek
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
fast-checks:
|
|
||||||
name: Pre-commit & Formatting
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Install uv
|
|
||||||
uses: https://github.com/astral-sh/setup-uv@v6
|
|
||||||
with:
|
|
||||||
enable-cache: true
|
|
||||||
ignore-nothing-to-cache: true
|
|
||||||
cache-dependency-glob: ''
|
|
||||||
|
|
||||||
- name: Run prek
|
|
||||||
run: |
|
|
||||||
uvx prek run \
|
|
||||||
--all-files \
|
|
||||||
--hook-stage manual \
|
|
||||||
--show-diff-on-failure \
|
|
||||||
--color=always \
|
|
||||||
-v
|
|
|
@ -9,7 +9,7 @@ repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v5.0.0
|
rev: v5.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: fix-byte-order-marker
|
- id: check-byte-order-marker
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
- id: check-symlinks
|
- id: check-symlinks
|
||||||
- id: destroyed-symlinks
|
- id: destroyed-symlinks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue