Skip to content

Commit

Permalink
CI: Add a manual (workflow_dispatch) workflow for fixing code forma…
Browse files Browse the repository at this point in the history
…tting (#146)
  • Loading branch information
DilumAluthge committed Dec 3, 2023
1 parent 2768c5e commit e973ada
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/FixFormat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Fix format
on:
workflow_dispatch:
concurrency:
# Skip intermediate builds: all builds except for builds on the `master` branch
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
permissions:
contents: write
pull-requests: write
jobs:
fix-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
persist-credentials: true # we intentionally set this to true, since we plan on committing and pushing later
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: make format-fix
- name: Create pull request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
with:
token: '${{ secrets.GITHUB_TOKEN }}'
commit-message: "🤖 Automatic code formatting"
committer: "GitHub Actions CI <[email protected]>"
title: "🤖 Automatic code formatting"
body: |
This pull request fixes the code formatting of the Julia files in branch ${{ github.ref_name }}.
Auto-generated by [create-pull-request][1].
[1]: https://github.com/peter-evans/create-pull-request
branch: create-pull-request/fixformat/${{ github.ref_name }}
delete-branch: true

0 comments on commit e973ada

Please sign in to comment.