Ryujinx-Mako/.github/workflows/format.yml
dependabot[bot] bbabbac209
Bump actions/checkout from 3 to 4 (#2)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 12:48:25 +02:00

34 lines
874 B
YAML

name: Format
on:
push:
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure git
run: |
git config --global user.name "ryujinx-mako[bot]"
git config --global user.email "142357924+ryujinx-mako[bot]@users.noreply.github.com"
- uses: psf/black@stable
with:
options: "--verbose"
- name: Check if files have been modified
id: mod_check
run: |
[[ $(git status -s | wc -l) -le 1 ]] \
&& echo "is-dirty=false" >> "$GITHUB_OUTPUT" \
|| echo "is-dirty=true" >> "$GITHUB_OUTPUT"
- name: Commit and push changes
if: steps.mod_check.outputs.is-dirty == 'true'
run: |
git add .
git commit -m "Apply black formatting"
git push