-
-
Notifications
You must be signed in to change notification settings - Fork 752
38 lines (30 loc) · 892 Bytes
/
color-check.yml
File metadata and controls
38 lines (30 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: 🎨 Check SVG icon colors
on:
pull_request:
paths:
- "icons/*.svg"
permissions:
contents: read
pull-requests: write
jobs:
color-check:
name: SVG Color Check
runs-on: ubuntu-latest
env:
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
steps:
- name: 📥 Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
sparse-checkout-cone-mode: false
sparse-checkout: |
material-colors.yml
icons/
- name: 🔄 Fetch target branch
run: |
git fetch origin $TARGET_BRANCH
- name: 🎨 Check colors
id: color-check
run: |
svgFiles=$(git diff origin/$TARGET_BRANCH --diff-filter=ACMRTUX --name-only | grep '.svg$')
npx svg-color-linter --config material-colors.yml ${svgFiles}