From d6a5d784b9e82fc20546e28c832cfd047252adb9 Mon Sep 17 00:00:00 2001 From: fsouza <108725+fsouza@users.noreply.github.com> Date: Wed, 12 Oct 2022 10:02:03 -0400 Subject: [PATCH] Setup automation with pre-commit-mirror-maker (#1) --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ .pre-commit-config.yaml | 5 ----- pyproject.toml | 15 --------------- ruff_pre_commit/__init__.py | 0 4 files changed, 27 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .pre-commit-config.yaml delete mode 100644 pyproject.toml delete mode 100644 ruff_pre_commit/__init__.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..306f54a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +name: main +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + build: + name: main + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - run: pip install pre-commit-mirror-maker + + - name: set git config + run: | + git config user.name 'Github Actions' + git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' + + - run: pre-commit-mirror --language python --package-name ruff --entry ruff --types python --description "Run ruff to lint Python files." --args='--fix' . + + - run: git push origin HEAD:refs/heads/main --tags diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 9a42064..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,5 +0,0 @@ -repos: - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.65 - hooks: - - id: lint diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 5876ad6..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,15 +0,0 @@ -[tool.poetry] -name = "ruff-pre-commit" -version = "0.0.1" -description = "" -authors = ["Charlie Marsh "] - -[tool.poetry.dependencies] -python = ">=3.8,<3.11" -ruff = "^0.0.65" - -[tool.poetry.dev-dependencies] - -[build-system] -requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" diff --git a/ruff_pre_commit/__init__.py b/ruff_pre_commit/__init__.py deleted file mode 100644 index e69de29..0000000