Setup automation with pre-commit-mirror-maker (#1)
This commit is contained in:
parent
5cacb88af8
commit
d6a5d784b9
27
.github/workflows/main.yml
vendored
Normal file
27
.github/workflows/main.yml
vendored
Normal 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
|
@ -1,5 +0,0 @@
|
||||
repos:
|
||||
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
||||
rev: v0.0.65
|
||||
hooks:
|
||||
- id: lint
|
@ -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"
|
Loading…
Reference in New Issue
Block a user