mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
### Motivation - Prevent concurrent GitHub Actions jobs from attempting to reserve the same `setup-uv` cache key and failing with "Unable to reserve cache ... another job may be creating this cache" when multiple workflows run at once. - Target workflows that enable `setup-uv` caching and have run concurrently in CI: pre-commit, check-generated-models, ai-engine, and sync_files_v2. ### Description - Added a `cache-suffix` value to the `astral-sh/setup-uv` step in `.github/workflows/pre_commit.yml`, `.github/workflows/check-generated-models.yml`, `.github/workflows/ai-engine.yml`, and `.github/workflows/sync_files_v2.yml` to create unique cache keys (`pre-commit`, `generated-models`, `ai-engine`, `sync-files`). - No behavior changes beyond isolating the uv cache keys per-workflow and no other workflow steps were modified. ### Testing - Ran `git diff --check` which completed with no reported whitespace or index issues. - Verified each modified workflow is valid YAML by loading them with a Ruby YAML parser which succeeded for all four files. - Attempted to run `task --list` to exercise the Taskfile locally but `task` is not installed in this environment so that check could not be executed. ------ [Codex Task](https://chatgpt.com/codex/cloud/tasks/task_e_6a58b399a33083259d65e0614fcc35d2)
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
name: Pre-commit
|
|
|
|
# Runs the repo-wide lint/format/secret checks via `task pre-commit`.
|
|
# Called from build.yml on PRs and merge_group; also runnable on demand via workflow_dispatch.
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
pre-commit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
cache-suffix: pre-commit
|
|
|
|
- name: Install Task
|
|
uses: go-task/setup-task@3be4020d41929789a01026e0e427a4321ce0ad44 # v2.0.0
|
|
|
|
- name: Run pre-commit checks
|
|
run: task pre-commit
|