Compare commits

...

7 commits

Author SHA1 Message Date
Jade Ellis
e61748497a
ci: Pin specific repo version
Some checks failed
Checks / Prefligit / prefligit (push) Failing after 13s
Release Docker Image / define-variables (push) Failing after 11s
Checks / Rust / Format (push) Failing after 9s
Release Docker Image / build-image (linux/amd64, release, linux-amd64, base) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, release, linux-arm64, base) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Checks / Rust / Clippy (push) Failing after 24s
Checks / Rust / Cargo Test (push) Failing after 26s
2025-06-21 18:54:15 +01:00
Jade Ellis
6476cdd9b8
ci: Set permissions explicitly 2025-06-21 18:46:36 +01:00
Jade Ellis
552653b460
ci: Cache uv toolchain 2025-06-21 18:42:43 +01:00
Jade Ellis
d1fa9d2af6
cierbose prefligit run 2025-06-21 18:38:19 +01:00
Jade Ellis
d1731fa8a0
ci: Fetch whole git history 2025-06-21 18:28:28 +01:00
Jade Ellis
69b6820ffe
ci: Install UV 2025-06-21 18:25:38 +01:00
Jade Ellis
e71f6e774c
ci: fixes 2025-06-21 18:20:04 +01:00
3 changed files with 17 additions and 4 deletions

View file

@ -23,6 +23,6 @@ indent_size = 2
indent_style = tab indent_style = tab
max_line_length = 98 max_line_length = 98
[{**/*.yml}] [*.yml]
indent_size = 2 indent_size = 2
indent_style = space indent_style = space

View file

@ -1,6 +1,6 @@
name: reflighit name: prefligit
description: | description: |
Runs reflighit, pre-commit reimplemented in Rust. Runs prefligit, pre-commit reimplemented in Rust.
inputs: inputs:
extra_args: extra_args:
description: options to pass to pre-commit run description: options to pass to pre-commit run
@ -10,6 +10,11 @@ inputs:
runs: runs:
using: composite using: composite
steps: 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 - name: Install Prefligit
shell: bash shell: bash
run: | run: |
@ -18,5 +23,5 @@ runs:
with: with:
path: ~/.cache/prefligit path: ~/.cache/prefligit
key: prefligit-0|${{ hashFiles('.pre-commit-config.yaml') }} key: prefligit-0|${{ hashFiles('.pre-commit-config.yaml') }}
- run: prefligit run --show-diff-on-failure --color=always ${{ inputs.extra_args }} - run: prefligit run --show-diff-on-failure --color=always -v ${{ inputs.extra_args }}
shell: bash shell: bash

View file

@ -2,6 +2,9 @@ name: Checks / Prefligit
on: on:
push: push:
pull_request:
permissions:
contents: read
jobs: jobs:
prefligit: prefligit:
@ -10,6 +13,11 @@ jobs:
FROM_REF: ${{ github.event.pull_request.base.sha || (!github.event.forced && ( github.event.before != '0000000000000000000000000000000000000000' && github.event.before || github.sha )) || format('{0}~', github.sha) }} 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 }} TO_REF: ${{ github.sha }}
steps: steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
depth: 0 # we need to be able to get diffs
- uses: ./.forgejo/actions/prefligit - uses: ./.forgejo/actions/prefligit
with: with:
extra_args: --from-ref ${{ env.FROM_REF }} --to-ref ${{ env.TO_REF }} --hook-stage manual extra_args: --from-ref ${{ env.FROM_REF }} --to-ref ${{ env.TO_REF }} --hook-stage manual