diff --git a/.github/workflows/FormatPR.yml b/.github/workflows/FormatPR.yml index 3717c0414..8ce8a2d44 100644 --- a/.github/workflows/FormatPR.yml +++ b/.github/workflows/FormatPR.yml @@ -1,28 +1,11 @@ -name: FormatPR +name: Format suggestions on: - push: - branches: - - master + pull_request + jobs: - build: + code-style: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Install JuliaFormatter and format - run: | - julia -e 'import Pkg; Pkg.add("JuliaFormatter")' - julia -e 'using JuliaFormatter; format(".")' - - name: Create Pull Request - id: cpr - uses: peter-evans/create-pull-request@v6 + - uses: julia-actions/julia-format@v3 with: - token: ${{ secrets.GITHUB_TOKEN }} - commit-message: ":robot: Format .jl files" - title: '[AUTO] JuliaFormatter.jl run' - branch: auto-juliaformatter-pr - delete-branch: true - labels: formatting, automated pr, no changelog - - name: Check outputs - run: | - echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" - echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1')