-
Notifications
You must be signed in to change notification settings - Fork 76
39 lines (37 loc) · 1.21 KB
/
icons-diff-check.yml
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
39
name: Icon Team Diff Check
on:
pull_request:
branches: [dev]
pull_request_review:
types: [submitted]
jobs:
check-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Check changed files
id: check-diff
run: |
non_icon_changes="$(
git diff --name-only HEAD "$(
git merge-base HEAD origin/dev
)" -- . ':!**/calcite-ui-icons/**'
)"
printf "changed non-icon files:\n%s" "$non_icon_changes"
# skip if the only changes are in package/calcite-ui-icons
if [ -z "$non_icon_changes" ]; then
echo "SKIP=true" >> "$GITHUB_OUTPUT"
else
echo "SKIP=false" >> "$GITHUB_OUTPUT"
fi
- if: steps.check-diff.outputs.SKIP == 'false'
name: Check pull request author and reviewers
uses: actions/github-script@v7
with:
github-token: ${{ secrets.ADMIN_TOKEN }}
script: |
const action = require('${{ github.workspace }}/.github/scripts/iconTeamDiffCheck.js')
await action({github, context, core})