Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2d803e7

Browse filesBrowse files
authored
Create check-dist.yml (actions#236)
* Add check-dist.yml * Fix triggers in licensed.yml
1 parent 43c2dc4 commit 2d803e7
Copy full SHA for 2d803e7

File tree

Expand file treeCollapse file tree

2 files changed

+58
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+58
-3
lines changed

‎.github/workflows/check-dist.yml

Copy file name to clipboard
+51Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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 from other source files.
5+
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
6+
name: Check dist/
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
paths-ignore:
13+
- '**.md'
14+
pull_request:
15+
paths-ignore:
16+
- '**.md'
17+
workflow_dispatch:
18+
19+
jobs:
20+
check-dist:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
26+
- name: Set Node.js 12.x
27+
uses: actions/setup-node@v1
28+
with:
29+
node-version: 12.x
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Rebuild the dist/ directory
35+
run: npm run build
36+
37+
- name: Compare the expected and actual dist/ directories
38+
run: |
39+
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
40+
echo "Detected uncommitted changes after build. See status below:"
41+
git diff
42+
exit 1
43+
fi
44+
id: diff
45+
46+
# If index.js was different than expected, upload the expected version as an artifact
47+
- uses: actions/upload-artifact@v2
48+
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
49+
with:
50+
name: dist
51+
path: dist/

‎.github/workflows/licensed.yml

Copy file name to clipboardExpand all lines: .github/workflows/licensed.yml
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
name: Licensed
22

33
on:
4-
push: {branches: main}
5-
pull_request: {branches: main}
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
610

711
jobs:
812
test:
@@ -17,4 +21,4 @@ jobs:
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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.