Skip to content

Commit

Permalink
run format on push to main
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfredo committed Dec 17, 2024
1 parent e5ba29a commit a66541e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types:
- opened
- edited
branches:
branches:
- main
push:
branches:
Expand All @@ -28,11 +28,11 @@ jobs:

- name: Switch branch
run: |
HEAD_REF="${{ github.head_ref }}"
if [ "$HEAD_REF" != "" && "$HEAD_REF" != "main" ]; then
git fetch origin $HEAD_REF
git switch $HEAD_REF
fi
HEAD_REF="${{ github.head_ref }}"
if [ "$HEAD_REF" != "" && "$HEAD_REF" != "main" ]; then
git fetch origin $HEAD_REF
git switch $HEAD_REF
fi
- name: Run linter
run: deno task lint
Expand All @@ -42,10 +42,10 @@ jobs:

- name: Upload changes to base branch
run: |
HEAD_REF="${{ github.head_ref }}"
if [ "$HEAD_REF" != "" && "$HEAD_REF" != "main" ]; then
git config user.name "github-actions"
git config user.email "[email protected]"
git commit -am "deno formatting"
git push
fi
HEAD_REF="${{ github.head_ref }}"
if [ "$HEAD_REF" != "main" ]; then
git config user.name "github-actions"
git config user.email "[email protected]"
git commit -am "deno formatting"
git push
fi

0 comments on commit a66541e

Please sign in to comment.