merge from develop #184
This file contains hidden or 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
name: Lint | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
contents: write | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
persist-credentials: true | |
- name: Set up Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: "1.2.4" | |
- name: Install dependencies | |
run: bun install | |
- name: Run linter | |
run: bun run lint | |
- name: Commit and push if there are changes | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
if [[ -n "$(git status --porcelain)" ]]; then | |
git add . | |
git commit -m "chore(lint): auto-fix lint issues" | |
git push origin HEAD:${{ github.head_ref }} | |
else | |
echo "No changes to commit." | |
fi |