Skip to content

Commit

Permalink
feat: github actions workflow to fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bo0tzz committed Oct 27, 2024
1 parent 988d527 commit 0ac621a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/fix-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Fix formatting

on:
pull_request:
types: [labeled]

jobs:
fix-formatting:
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'fix:formatting' }}
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}

- name: 'Checkout'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.generate-token.outputs.token }}

- name: Fix formatting
run: make install-all && format-all

- name: Commit and push
uses: EndBug/add-and-commit@v9
with:
message: chore: fix formatting

0 comments on commit 0ac621a

Please sign in to comment.