Skip to content

Commit

Permalink
chore(publish): pre-commit错误
Browse files Browse the repository at this point in the history
  • Loading branch information
AkashiCoin committed Aug 27, 2024
1 parent 7d8eac3 commit 698c525
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/publish_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ jobs:
poetry install --no-root
poetry run pip install pydantic==1.10
curl -sSL https://github.com/zhenxun-org/zhenxunflow/releases/latest/download/plugin_test.py | poetry run python -
noneflow:
zhenxunflow:
runs-on: ubuntu-latest
name: noneflow
name: zhenxunflow
needs: plugin_test
steps:
- name: Generate token
Expand All @@ -131,6 +131,12 @@ jobs:
with:
token: ${{ steps.generate-token.outputs.token }}

- name: Cache pre-commit hooks
uses: actions/cache@v4
with:
path: .cache/.pre-commit
key: zhenxunflow-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}

- name: zhenxunflow
uses: docker://ghcr.io/zhenxun-org/zhenxunflow:latest
with:
Expand All @@ -144,4 +150,8 @@ jobs:
PLUGIN_TEST_OUTPUT: ${{ needs.plugin_test.outputs.output }}
PLUGIN_TEST_METADATA: ${{ needs.plugin_test.outputs.metadata }}
APP_ID: ${{ secrets.APP_ID }}
PRIVATE_KEY: ${{ secrets.APP_KEY }}
PRIVATE_KEY: ${{ secrets.APP_KEY }}
PRE_COMMIT_HOME: /github/workspace/.cache/.pre-commit

- name: Fix permission
run: sudo chown -R $(whoami):$(id -ng) .cache/.pre-commit
21 changes: 21 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ci:
autofix_commit_msg: "style: auto fix by pre-commit hooks"
autofix_prs: true
autoupdate_branch: main
autoupdate_schedule: quarterly
autoupdate_commit_msg: "chore: auto update by pre-commit hooks"
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
stages: [commit]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [javascript, jsx, ts, tsx, markdown, yaml, json]
stages: [commit]

0 comments on commit 698c525

Please sign in to comment.