From 0416d442b87430649494415bfd4fac52d4ec1234 Mon Sep 17 00:00:00 2001 From: Souma <101255979+5ouma@users.noreply.github.com> Date: Fri, 6 Dec 2024 20:48:09 +0900 Subject: [PATCH] ci(pre-commit): Use GitHub Actions to run pre-commit (#185) pre-commit.ci has a size limit. --- .pre-commit-config.yaml => .github/pre-commit.yml | 6 ------ .github/workflows/pre-commit.yml | 14 ++++++++++++++ README.md | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) rename .pre-commit-config.yaml => .github/pre-commit.yml (89%) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.pre-commit-config.yaml b/.github/pre-commit.yml similarity index 89% rename from .pre-commit-config.yaml rename to .github/pre-commit.yml index 5c8da91..f230d7c 100644 --- a/.pre-commit-config.yaml +++ b/.github/pre-commit.yml @@ -1,9 +1,3 @@ -ci: - autofix_commit_msg: | - chore(fix): Auto fixes from pre-commit.com hooks - - For more information, see https://pre-commit.ci. - repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..aea5630 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: 🚸 pre-commit + +on: + push: + branches: [main] + pull_request: + +jobs: + pre-commit: + runs-on: Ubuntu-Latest + + steps: + - name: 🚸 Run pre-commit + uses: 5ouma/utils/pre-commit@23aec800e821891339568c454135bb9befe36fce # main diff --git a/README.md b/README.md index 77437ad..5cd1fa5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@
[![CI](https://img.shields.io/github/actions/workflow/status/5ouma/opml-generator/ci.yml?label=ci&style=flat-square)](https://github.com/5ouma/opml-generator/actions/workflows/ci.yml) [![Release](https://img.shields.io/github/actions/workflow/status/5ouma/opml-generator/release.yml?label=release&style=flat-square)](https://github.com/5ouma/opml-generator/actions/workflows/release.yml) -[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/5ouma/opml-generator/main.svg?style=flat-square)](https://results.pre-commit.ci/latest/github/5ouma/opml-generator/main) +[![pre-commit](https://img.shields.io/github/actions/workflow/status/5ouma/opml-generator/pre-commit.yml?label=pre-commit&style=flat-square)](https://github.com/5ouma/opml-generator/actions/workflows/pre-commit.yml) [![codecov](https://codecov.io/github/5ouma/opml-generator/graph/badge.svg)](https://codecov.io/github/5ouma/opml-generator)