mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-08-29 11:58:24 +02:00
* cd: pin actions * fix: remove trailing whitespace in release.yml to pass prettier lint Co-authored-by: ericfennis <11825403+ericfennis@users.noreply.github.com> * Format code --------- Co-authored-by: Eric Fennis <eric.fennis@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ericfennis <11825403+ericfennis@users.noreply.github.com>
73 lines
2.2 KiB
YAML
73 lines
2.2 KiB
YAML
name: Linting Icons
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- next
|
|
pull_request:
|
|
paths:
|
|
- 'icons/*'
|
|
- 'lab/*'
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
lint-filenames:
|
|
name: Lint Filenames
|
|
if: github.repository == 'lucide-icons/lucide'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
cache: 'pnpm'
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@9426d40962ed5378910ee2e21d5f8c6fcbf2dd96 # v47.0.6
|
|
with:
|
|
files: |
|
|
icons/*
|
|
lab/*
|
|
|
|
- name: Generate annotations
|
|
run: node ./scripts/lintFilenames.mts
|
|
env:
|
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
|
|
|
check-lab-icons:
|
|
name: Check Lab Icons
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
cache: 'pnpm'
|
|
node-version-file: 'package.json'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Check lab icons do not already exist in icons
|
|
run: node ./scripts/checkLabIcons.mts
|
|
|
|
lint-aliases:
|
|
name: Check Uniqueness of Aliases
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Check Uniqueness of Aliases
|
|
run: "! cat <(printf \"%s\\n\" icons/*.json | while read -r name; do basename \"$name\" .json; done) <(jq -cr 'select(.aliases) | .aliases[] | if type==\"string\" then . else .name end' icons/*.json) | sort | uniq -c | grep -ve '^\\s*1 '"
|