screen-locker/.github/workflows/pre-commit.yml
Krzysztof kuhy Rudnicki 6b756c8da2
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
pre-commit / pre-commit (push) Waiting to run
Tests / test (3.10) (push) Waiting to run
Tests / test (3.11) (push) Waiting to run
Tests / test (3.12) (push) Waiting to run
Tests / lock-popup-safety (push) Waiting to run
release-apk / release (APK) (push) Waiting to run
Give the pre-commit workflow the shared-gate checkout it needs
Both delegating hooks were exiting 1 with "shared gate not found at
/home/runner/utils/scripts/...". The workflow runs `pre-commit/action` against
a bare checkout, so nothing put kuhyx/utils where the delegates look. It now
checks the shared repo out to `.utils` and points `UTILS_ROOT` at it, the same
way every other workflow in the fleet does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRykabMwPgDzFHcARoqpaK
2026-08-28 15:19:11 +02:00

45 lines
1.5 KiB
YAML

name: pre-commit
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Hooks here delegate to the shared gates in kuhyx/utils. Without this
# checkout they exit 1 with "shared gate not found at
# /home/runner/utils/..." -- which is what this workflow was doing on
# every run since those hooks were added.
- name: Check out the shared gates
uses: actions/checkout@v4
with:
repository: kuhyx/utils
path: .utils
- name: Point the delegates at that checkout
run: echo "UTILS_ROOT=$GITHUB_WORKSPACE/.utils" >> "$GITHUB_ENV"
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# The flutter-analyze pre-commit hook shells out to `flutter analyze` in
# stronglift_replacement/workout_app. Pin to the version the app is
# developed against (Dart SDK ^3.12.2) so CI's analyzer matches local.
- uses: subosito/flutter-action@v2
with:
flutter-version: 3.47.2
channel: stable
cache: true
- name: Install dependencies
run: pip install -r requirements.txt
# analyze needs resolved packages (.dart_tool); the hook runs analyze
# only, so fetch deps here first.
- name: Resolve Flutter packages
run: flutter pub get
working-directory: stronglift_replacement/workout_app
- uses: pre-commit/action@v3.0.1