Skip to content

Feat/pr lint

Feat/pr lint #14

Workflow file for this run

name: lint
on:
pull_request:
paths:
- 'icons/*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: icons/*
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/[email protected]
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node ./scripts/updateContributors.mjs ${{ steps.changed-files.outputs.all_changed_files }}
- env:
ANNOTATION_SEVERITY: notice
ANNOTATION_TITLE: Contributors have changed!
run: git diff --unified=0 | perl -ne '/^(\+|- |@)/ && print' | perl -pe 's/\n/%0A/' | perl -pe 's/%0A(\+\+\+ b\/)/\n\1/g' | perl -pe "s/\+\+\+ b\/([^@]*)%0A@@ -(\d+)[^\s]* \+(\d+)[^@]*@@(.*)/::$ANNOTATION_SEVERITY file=\1,line=\2,endLine=\3,title=$ANNOTATION_TITLE::\4/"
- run: git diff --exit-code