Skip to content

Commit

Permalink
ci: experimental action to format PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
sargunv committed Nov 27, 2024
1 parent ac6d02e commit 3ec840b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/format-on-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: "Format on command"

on:
pull_request:
types: [labeled]

jobs:
format:
runs-on: "ubuntu-latest"
if: "github.event.label.name == 'format-action'"
permissions:
contents: write
pull-requests: write
steps:
- uses: "actions/checkout@v4"
with:
ref: "${{ github.head_ref }}"
- uses: "./.github/actions/setup"
- run: "./gradlew spotlessApply"
- uses: "stefanzweifel/git-auto-commit-action@v4"
with:
commit_message: "Apply formatting"

0 comments on commit 3ec840b

Please sign in to comment.