Update ESLint configuration #155
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 Code | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
pull_request: | |
branches: | |
- develop | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
THUMBNAIL_URL: ${{ vars.THUMBNAIL_URL }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install bun | |
uses: oven-sh/setup-bun@v2 | |
- name: Install dependencies | |
run: bun install | |
- name: Install dependencies # (assuming your project has dependencies) | |
run: bun install # You can use npm/yarn/pnpm instead if you prefer | |
- name: Check for changes | |
id: verify-changed-files | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Commit linter changes | |
if: steps.verify-changed-files.outputs.changed == 'true' | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "🔧 Auto-fix: ESLint formatting and fixes" | |
git push |