Skip to content

Commit 8b3183b

Browse files
DevOpsDevOps
authored andcommitted
feat: sync the updated precommitfiles
1 parent d9a4fd6 commit 8b3183b

3 files changed

Lines changed: 44 additions & 11 deletions

File tree

.github/workflows/releaser.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,3 @@ jobs:
187187
--reviewer enzokamal || echo "PR creation failed, possibly no changes or reviewer issue"
188188
env:
189189
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
190-
191-
# - name: Run GoReleaser
192-
# if: steps.check_commits.outputs.skip != 'true' && steps.commit_changelog.outputs.skip_pr != 'true'
193-
# uses: goreleaser/goreleaser-action@v6
194-
# with:
195-
# distribution: goreleaser
196-
# version: v2.9.0
197-
# args: release --clean --release-notes=RELEASE_NOTES.md
198-
# env:
199-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Sync Pre-commit Config
2+
3+
on:
4+
push:
5+
paths:
6+
- ".pre-commit-config.yaml"
7+
- "precommitFile/**"
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
sync-config:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Copy .pre-commit-config.yaml to precommitFile directory
22+
run: |
23+
mkdir -p precommitFile
24+
cp .pre-commit-config.yaml precommitFile/.pre-commit-config.yaml
25+
26+
- name: Check for changes
27+
id: git_status
28+
run: |
29+
if git diff --quiet; then
30+
echo "changed=false" >> $GITHUB_OUTPUT
31+
else
32+
echo "changed=true" >> $GITHUB_OUTPUT
33+
fi
34+
35+
- name: Commit and push changes
36+
if: steps.git_status.outputs.changed == 'true'
37+
run: |
38+
git config --local user.email "actions@github.com"
39+
git config --local user.name "GitHub Actions"
40+
git add precommitFile/.pre-commit-config.yaml
41+
42+
git commit -m "Sync pre-commit-config.yaml to precommitFile/"
43+
git push

global/pre-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ repos:
361361
- id: check-yaml
362362
- id: end-of-file-fixer
363363
- id: trailing-whitespace
364-
- id: check-added-large-files
364+
- id: check-added-large-files
365365
- id: check-vcs-permalinks
366366
- id: check-symlinks
367367
- id: destroyed-symlinks

0 commit comments

Comments
 (0)