Skip to content

Feat/pr lint

Feat/pr lint #5

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 }}
- run: git diff | perl -pe 's/\n/%0A/' | perl -pe 's/%0A(\+\+\+ b\/)/\n\1/' | perl -ne 's/\+\+\+ b\/([^%0A]+)%0A@@ -(\d+)[^\s\+]*\s\+(\d+)[^\@\@]*@@(.*)/::error file=\1,line=\2::\4/ && print'
- run: git diff --exit-code