Revert "brixster has free speech again and ONLY brix does" #235
This file contains 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: Check build & lint errors | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install node@20 | |
uses: actions/[email protected] | |
- name: Install dependencies | |
run: npm install | |
- name: Pull latest changes | |
run: git pull | |
- name: Test build | |
run: npm run build | |
- name: Test Lint | |
run: npx eslint "src/**" --fix | |
- name: Commit changes | |
id: commit | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
if git diff-index --quiet HEAD; then | |
echo "No changes to commit." | |
echo "changes_committed=false" >> $GITHUB_ENV | |
else | |
git commit -m "chore: format code with eslint" | |
echo "changes_committed=true" >> $GITHUB_ENV | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push changes | |
if: env.changes_committed == 'true' | |
run: git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |