π€ added variables anyway #178
Workflow file for this run
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: ESLint CI | |
on: | |
push: | |
paths: | |
- '**.js' | |
- '**.ts' | |
- '**.jsx' | |
- '**.tsx' | |
- '.eslintrc.json' | |
- '.prettierrc.json' | |
- '.github/workflows/eslint.yml' | |
- package.json | |
jobs: | |
build: | |
name: ESLint | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Run ESLint | |
run: yarn lint | |
- name: Push auto-fixed files | |
run: | | |
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} | |
git config --global user.name "${GITHUB_ACTOR}" | |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
if (git diff --shortstat | grep '[0-9]'); then \ | |
git add .; \ | |
git commit -m "π Fixed auto-fixable ESLint errors by github-actions"; \ | |
git push origin HEAD:${GITHUB_REF}; \ | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |