Skip to content

Merge pull request #228 from GreepTheSheep/depfu/update/npm/nodemon-3… #444

Merge pull request #228 from GreepTheSheep/depfu/update/npm/nodemon-3…

Merge pull request #228 from GreepTheSheep/depfu/update/npm/nodemon-3… #444

Workflow file for this run

name: Lint
on:
push:
branches-ignore:
- 'main'
tags:
- '*'
workflow_dispatch:
permissions: write-all
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Declare commit sha variables
id: vars
shell: bash
run: echo "::set-output name=sha::$(echo ${GITHUB_SHA})"
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Node v16
uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Check if changes were made
id: check-changes
run: |
if [ -z "$(git diff --name-only HEAD)" ]; \
then echo '::set-output name=changed::false'; \
else echo '::set-output name=changed::true'; fi
- name: Commit files
if: steps.check-changes.outputs.changed == 'true'
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am ":rotating_light: Lint - ${{ steps.vars.outputs.sha }}"
- name: Push changes
if: steps.check-changes.outputs.changed == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.gh_token }}
branch: ${{ github.ref }}