File tree Expand file tree Collapse file tree 2 files changed +57
-3
lines changed
Expand file tree Collapse file tree 2 files changed +57
-3
lines changed Original file line number Diff line number Diff line change 1+ # `dist/index.js` is a special file in Actions.
2+ # When you reference an action with `uses:` in a workflow,
3+ # `index.js` is the code that will run.
4+ # For our project, we generate this file through a build process
5+ # from other source files.
6+ # We need to make sure the checked-in `index.js` actually matches what we expect it to be.
7+ name : Check dist/
8+
9+ on :
10+ push :
11+ branches :
12+ - main
13+ paths-ignore :
14+ - ' **.md'
15+ pull_request :
16+ paths-ignore :
17+ - ' **.md'
18+ workflow_dispatch :
19+
20+ jobs :
21+ check-dist :
22+ runs-on : ubuntu-latest
23+
24+ steps :
25+ - uses : actions/checkout@v2
26+
27+ - name : Set Node.js 12.x
28+ uses : actions/setup-node@v1
29+ with :
30+ node-version : 12.x
31+
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ - name : Move the committed index.js file
36+ run : mv dist/ /tmp/
37+
38+ - name : Rebuild the index.js file
39+ run : npm run build
40+
41+ - name : Compare the expected and actual index.js files
42+ run : git diff --ignore-all-space dist/ /tmp/dist
43+ id : diff
44+
45+ # If index.js was different than expected, upload the expected version as an artifact
46+ - uses : actions/upload-artifact@v2
47+ if : ${{ failure() && steps.diff.conclusion == 'failure' }}
48+ with :
49+ name : dist
50+ path : dist/
Original file line number Diff line number Diff line change 11name : Licensed
22
33on :
4- push : {branches: main}
5- pull_request : {branches: main}
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
610
711jobs :
812 test :
1721 curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
1822 sudo tar -xzf licensed.tar.gz
1923 sudo mv licensed /usr/local/bin/licensed
20- - run : licensed status
24+ - run : licensed status
You can’t perform that action at this time.
0 commit comments