Skip to content

Commit

Permalink
ci: update format PAT (#8656)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcansh committed Feb 22, 2022
1 parent fd1a20b commit 5f212eb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches:
- main
- dev

jobs:
format:
if: github.repository == 'remix-run/react-router'
runs-on: ubuntu-latest

steps:
Expand All @@ -15,6 +17,8 @@ jobs:

- name: Checkout Repository
uses: actions/checkout@v2
with:
token: ${{ secrets.FORMAT_PAT }}

- name: Use Node.js
uses: actions/setup-node@v2
Expand All @@ -29,14 +33,14 @@ jobs:

- name: Commit
run: |
git config --local user.email "github-actions@remix.run"
git config --local user.email "hello@remix.run"
git config --local user.name "Remix Run Bot"
git add .
if [ -z "$(git status --porcelain)" ]; then
echo "💿 no formatting changed"
exit 0
fi
git commit -m "chore: format" -m "formatted $GITHUB_SHA"
git commit -m "chore: format"
git push
echo "💿 pushed formatting changes https://github.com/$GITHUB_REPOSITORY/commit/$(git rev-parse HEAD)"

0 comments on commit 5f212eb

Please sign in to comment.