From 2c6c25897d3de983cf5385df5a9eb35710bb4934 Mon Sep 17 00:00:00 2001 From: "Dung Duc Huynh (Kaka)" <870029+jellydn@users.noreply.github.com> Date: Wed, 1 May 2024 21:35:28 +0800 Subject: [PATCH] ci: add git auto commit action (#88) * ci: add git auto commit action with pre-commit * ci: allow to continue on error after run pre-commit * ci: merge to pre commit yaml --- .github/workflows/pre-commit.yml | 19 +++++++++++++++++++ cspell-tool.txt | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d0707c1..faeac1c 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -12,3 +12,22 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - uses: pre-commit/action@v3.0.1 + + format-code: + runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + - name: Install pre-commit + run: pip install pre-commit + + - name: Run pre-commit + run: pre-commit run --all-files + continue-on-error: true + + # Commit all changed files back to the repository + - uses: stefanzweifel/git-auto-commit-action@v5 diff --git a/cspell-tool.txt b/cspell-tool.txt index 177ea5d..4389e35 100644 --- a/cspell-tool.txt +++ b/cspell-tool.txt @@ -24,4 +24,6 @@ docstrings sweepai pygithub sandboxed -biomejs \ No newline at end of file +biomejs +miniconda +stefanzweifel \ No newline at end of file