-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3800d2
commit 2d4a5c0
Showing
1 changed file
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,20 @@ on: | |
- '*/*' # matches every branch containing a single '/' | ||
- '**' # matches every branch | ||
- '!main' # excludes main | ||
merge_group: | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: dorny/[email protected] | ||
id: filter | ||
with: | ||
filters: | | ||
yaml_file_change: | ||
- added|modified: '**.yml' | ||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
|
@@ -24,10 +31,12 @@ jobs: | |
- name: Format YAML files | ||
run: yamlfmt config | ||
- name: Add formatting changes | ||
if: steps.filter.outputs.julia_file_change == 'true' | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "GitHub Actions" | ||
git add . | ||
git commit -m "Automatic YAML formatting" | ||
- name: Push changes to current branch | ||
if: steps.filter.outputs.julia_file_change == 'true' | ||
run: git push origin ${{ github.head_ref }} |