Skip to content

Commit

Permalink
updated github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hitblast committed Dec 15, 2023
1 parent a96ce99 commit da1149e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 57 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/formatting.yml

This file was deleted.

27 changes: 24 additions & 3 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT

name: Linting
name: Format & Lint

on:
push:
Expand All @@ -18,10 +18,31 @@ jobs:
ruff:
name: Ruff
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run Ruff
- name: Check
id: lintcheck
uses: chartboost/ruff-action@v1
continue-on-error: true

- name: Format
uses: chartboost/ruff-action@v1
with:
args: format .

- name: Create pull request
if: steps.lintcheck.outcome != 'success'
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "🎨 Automated formatting errors fix"
commit-message: "fixed formatting errors (ruff)"
body: |
Formatter errors found in: ${{ github.sha }}.
base: ${{ github.head_ref }}
branch: actions/ruff
reviewers: hitblast
delete-branch: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ An asynchronous Python wrapper for the [Minecraft Server Status API](https://api
| Checks | Status |
|:---|---:|
| pretty code | [![Linting](https://github.com/hitblast/api.mcsrvstat.py/actions/workflows/linting.yml/badge.svg)](https://github.com/hitblast/api.mcsrvstat.py/actions/workflows/linting.yml) |
| style enforcement | [![Formatting](https://github.com/hitblast/api.mcsrvstat.py/actions/workflows/formatting.yml/badge.svg)](https://github.com/hitblast/api.mcsrvstat.py/actions/workflows/formatting.yml) |


</div>

Expand Down

0 comments on commit da1149e

Please sign in to comment.