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 ffc8f0b
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

"github.head_ref" is potentially untrusted. avoid using it directly in inline scripts. instead, pass it through an environment variable. see https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions for more details [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 -m "Fix format"
git push origin HEAD:${{ github.head_ref }}

0 comments on commit ffc8f0b

Please sign in to comment.