name: Lint on: push: branches: - main jobs: eslint: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Setup node uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - name: Install dependencies run: yarn - name: ESLint run: yarn lint - name: Commit changes run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.name "awesome-stars" git add -A git diff-index --quiet HEAD || git commit -m "📝 Lint" - name: Pull changes run: git pull -r - name: Push changes uses: ad-m/github-push-action@6defe3bd9f0a0846636a7d99ab96ccc75f2c858b with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: 'main'