gatsby-pingbot/.github/workflows/lint.yml

37 lines
923 B
YAML

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@v2
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@8407731efefc0d8f72af254c74276b7a90be36e1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'main'