mirror of
https://github.com/lucide-icons/lucide.git
synced 2025-12-16 21:27:42 +01:00
fix(ci): reduces workflow triggers (#3150)
* ci: reduces workflow triggers * chore: removed lint-contributors step * Update .github/workflows/labeler.yml
This commit is contained in:
2
.github/workflows/lint-code.yml
vendored
2
.github/workflows/lint-code.yml
vendored
@@ -2,6 +2,8 @@ name: Linting PR
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
paths-ignore:
|
||||||
|
- icons/*.svg
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-code:
|
lint-code:
|
||||||
|
|||||||
1
.github/workflows/lint-pr-title.yml
vendored
1
.github/workflows/lint-pr-title.yml
vendored
@@ -5,7 +5,6 @@ on:
|
|||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- edited
|
- edited
|
||||||
- synchronize
|
|
||||||
- reopened
|
- reopened
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
42
.github/workflows/linting-icons.yml
vendored
42
.github/workflows/linting-icons.yml
vendored
@@ -25,48 +25,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
|
|
||||||
lint-contributors:
|
|
||||||
name: Lint Contributors
|
|
||||||
if: github.repository == 'lucide-icons/lucide'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Get changed files
|
|
||||||
id: changed-files
|
|
||||||
uses: tj-actions/changed-files@v46
|
|
||||||
with:
|
|
||||||
files: icons/*
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version-file: 'package.json'
|
|
||||||
- name: Install simple-git (safer and faster than installing all deps)
|
|
||||||
run: npm install simple-git
|
|
||||||
|
|
||||||
- name: Generate annotations
|
|
||||||
run: node ./scripts/updateContributors.mjs
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
FETCH_DEPTH: ${{ github.event.pull_request.commits }}
|
|
||||||
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
||||||
|
|
||||||
- name: Generate annotations
|
|
||||||
env:
|
|
||||||
ANNOTATION_SEVERITY: notice
|
|
||||||
ANNOTATION_TITLE: Contributors have changed!
|
|
||||||
ANNOTATION_DESCRIPTION: Don't add people who have only performed automatic optimizations.
|
|
||||||
run: |
|
|
||||||
git diff --unified=0 -- icons/*.json | # diff icon metadata (unified=0 gives the correct chunk line number)
|
|
||||||
perl -ne '/^(\+|- |@)/ && print' | # get chunks (lines that start with "+++", "@@", "+ ", "- ")
|
|
||||||
perl -pe 's/\n/%0A/' | # url encode line breaks (\n -> %0A)
|
|
||||||
perl -pe 's/%0A(\+\+\+ b\/)/\n\1/g' | # split chunks(one chunk per line)
|
|
||||||
perl -pe "s/\+\+\+ b\/([^@]*)%0A@@ -(\d+)[^\s]* \+(\d+)[^@]*@@(.*)/::$ANNOTATION_SEVERITY file=\1,line=\2,endLine=\3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A\4/"
|
|
||||||
# Example for the previous substitution
|
|
||||||
# input: +++ b/icons/accessibility.json%0A@@ -2,0 +3 @@%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
|
|
||||||
# output: ::$ANNOTATION_SEVERITY file=icons/accessibility.json,line=2,endLine=3,title=$ANNOTATION_TITLE::$ANNOTATION_DESCRIPTION%0A%0A+ "contributors": ["hi"],%0A@@ -13 +14 @@%0A+}%0A
|
|
||||||
|
|
||||||
lint-aliases:
|
lint-aliases:
|
||||||
name: Check Uniqueness of Aliases
|
name: Check Uniqueness of Aliases
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
1
.github/workflows/lucide-font.yml
vendored
1
.github/workflows/lucide-font.yml
vendored
@@ -3,7 +3,6 @@ name: Lucide font checks
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- icons/**
|
|
||||||
- tools/build-font/**
|
- tools/build-font/**
|
||||||
- pnpm-lock.yaml
|
- pnpm-lock.yaml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user