aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2026-01-16 20:56:27 +0800
committerGitHub <noreply@github.com>2026-01-16 20:56:27 +0800
commitfd4d01a629105d9405a6cecb2a1efd3ffa6a9334 (patch)
tree831d979118234ae8b1a2eebdfe7187c2ff966391 /.github
parent1119f6c3cf421da2f2db92873efae8135c76b678 (diff)
parentbb6cf77844343bbf55be3dad201340572564d132 (diff)
downloadDropOut-fd4d01a629105d9405a6cecb2a1efd3ffa6a9334.tar.gz
DropOut-fd4d01a629105d9405a6cecb2a1efd3ffa6a9334.zip
Merge pull request #55 from HsiangNianian/feat/Instance/Profile-System
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/prek.yml16
1 files changed, 12 insertions, 4 deletions
diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml
index b49447d..8e43763 100644
--- a/.github/workflows/prek.yml
+++ b/.github/workflows/prek.yml
@@ -35,15 +35,23 @@ jobs:
librsvg2-dev \
pkg-config
- - name: Run prek (auto-fix)
+ - name: Run prek
id: prek
uses: j178/prek-action@v1
continue-on-error: true
- with:
- all_files: true
- - name: Commit fixes
+ - name: Check for changes
+ id: check_changes
if: steps.prek.outcome == 'failure'
+ run: |
+ if [ -n "$(git status --porcelain)" ]; then
+ echo "has_changes=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_changes=false" >> $GITHUB_OUTPUT
+ fi
+
+ - name: Commit fixes
+ if: steps.prek.outcome == 'failure' && steps.check_changes.outputs.has_changes == 'true'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: apply prek auto-fixes [skip ci]"