-
-
Notifications
You must be signed in to change notification settings - Fork 353
52 lines (43 loc) · 1.43 KB
/
main.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
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Check packages
on: [pull_request]
jobs:
robotcdnjs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: download checker
uses: wei/wget@v1
with:
args: https://github.com/cdnjs/tools/releases/latest/download/checker
- run: sudo chmod +x ./checker
- name: find PR
id: pr
run: |
number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
echo "##[set-output name=number;]$number"
- name: find modified packages
id: diff
uses: dorner/file-changes-action@v1.2.0
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
plaintext: true
prNumber: ${{ steps.pr.outputs.number }}
- name: lint package
id: lint
run: bash ./scripts/lint.sh \
${{ steps.diff.outputs.files_modified }} \
${{ steps.diff.outputs.files_added }}
# install glob
- uses: actions/checkout@v2
with:
repository: cdnjs/glob
path: ./glob
- run: cd ${{ github.workspace }}/glob && npm install
- name: compute files
id: files
env:
DOCKER_IMAGE: ghcr.io/cdnjs/tools:cf63aa8265f012629ca4dad9d431f90311d68bcc2
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash ./scripts/show-files.sh \
${{ steps.diff.outputs.files_modified }} \
${{ steps.diff.outputs.files_added }}