Setup automation with pre-commit-mirror-maker (#1)

This commit is contained in:
fsouza 2022-10-12 10:02:03 -04:00 committed by GitHub
parent 5cacb88af8
commit d6a5d784b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 27 additions and 20 deletions

27
.github/workflows/main.yml vendored Normal file
View File

@ -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

View File

@ -1,5 +0,0 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.65
hooks:
- id: lint

View File

@ -1,15 +0,0 @@
[tool.poetry]
name = "ruff-pre-commit"
version = "0.0.1"
description = ""
authors = ["Charlie Marsh <charlie.r.marsh@gmail.com>"]
[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"