Skip to content

Commit

Permalink
chore: attempt to auto format PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Jul 25, 2024
1 parent 26e7d83 commit 9d4f9e5
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
on:
schedule:
# Run daily
- cron: "0 22 * * *"
name: Auto-format
pull_request:
name: Auto-format Pull Request
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.FTL_AUTOFMT_TOKEN }}
- name: Init Hermit
run: ./bin/hermit env -r >> "$GITHUB_ENV"
Expand All @@ -24,5 +20,5 @@ jobs:
run: |

Check failure on line 20 in .github/workflows/autofmtpr.yml

View workflow job for this annotation

GitHub Actions / Lint

configuration variable name "github_head_ref" must not start with the GITHUB_ prefix (case insensitive). note: see the convention at https://docs.github.com/en/actions/learn-github-actions/variables#naming-conventions-for-configuration-variables [expression]
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git commit -am "chore(autofmt): Automated formatting"
git push
git commit -a --amend --no-edit
git push origin HEAD:${{ vars.GITHUB_HEAD_REF }} --force

0 comments on commit 9d4f9e5

Please sign in to comment.