77 runs-on : ubuntu-latest
88 steps :
99 - uses : actions/checkout@v2
10+ with :
11+ fetch-depth : 0
1012
1113 - name : download checker
1214 uses : wei/wget@v1
@@ -15,25 +17,15 @@ jobs:
1517
1618 - run : sudo chmod +x ./checker
1719
18- - name : find PR
19- id : pr
20- run : |
21- number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
22- echo "##[set-output name=number;]$number"
23-
24- - name : find modified packages
25- id : diff
26- uses : dorner/file-changes-action@v1.2.0
27- with :
28- githubToken : ${{ secrets.GITHUB_TOKEN }}
29- plaintext : true
30- prNumber : ${{ steps.pr.outputs.number }}
31-
3220 - name : lint package
3321 id : lint
34- run : bash ./scripts/lint.sh \
35- ${{ steps.diff.outputs.files_modified }} \
36- ${{ steps.diff.outputs.files_added }}
22+ run : |
23+ mapfile -d '' files < <(
24+ git diff --name-only -z \
25+ "${{ github.event.pull_request.base.sha }}" \
26+ "${{ github.event.pull_request.head.sha }}"
27+ )
28+ bash ./scripts/lint.sh "${files[@]}"
3729
3830 # install glob
3931 - uses : actions/checkout@v2
4739 env :
4840 DOCKER_IMAGE : ghcr.io/cdnjs/tools:cf63aa8265f012629ca4dad9d431f90311d68bcc2
4941 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50- run : bash ./scripts/show-files.sh \
51- ${{ steps.diff.outputs.files_modified }} \
52- ${{ steps.diff.outputs.files_added }}
42+ run : |
43+ mapfile -d '' files < <(
44+ git diff --name-only -z \
45+ "${{ github.event.pull_request.base.sha }}" \
46+ "${{ github.event.pull_request.head.sha }}"
47+ )
48+ bash ./scripts/show-files.sh "${files[@]}"
0 commit comments