Skip to content

Commit

Permalink
👷 Add GitHub action to format code
Browse files Browse the repository at this point in the history
Signed-off-by: palexdev <alessandro.parisi406@gmail.com>
  • Loading branch information
palexdev committed Oct 27, 2024
1 parent 1f88e26 commit cb43024
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/intellij-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# GitHub Action for code formatting using IntelliJ IDEA

name: IntelliJ Format
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache IDEA
uses: actions/cache@v3
with:
path: /home/runner/work/_temp/_github_workflow/idea-cache
key: ${{ runner.os }}-idea-cache-v2
- uses: notdevcody/intellij-format-action@v2
with:
include-glob: '*.java'
style-settings-file: '.idea/codeStyles/Default.xml'
commit-message: ':art: Reformat code'
fail-on-changes: 'false'

0 comments on commit cb43024

Please sign in to comment.