From 9144833cd2e7de02afe95671651bff97f8762cd9 Mon Sep 17 00:00:00 2001 From: Joshua Lampert <51029046+JoshuaLampert@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:07:45 -0400 Subject: [PATCH] Use julia-format action (#965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * use julia-format action * test reviewdog * rename file back to FormatPR.yml * Update src/Meshes.jl --------- Co-authored-by: JĂșlio Hoffimann --- .github/workflows/FormatPR.yml | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) 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')