-
Notifications
You must be signed in to change notification settings - Fork 821
39 lines (33 loc) · 1.06 KB
/
bad-files-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: Bad files check
on:
pull_request:
jobs:
check:
name: Dist check
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get specific changed files in dist
id: changed-files-specific
uses: tj-actions/changed-files@v41
with:
files: |
dist
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "yarn.lock"
- name: Fail if dist files changed
if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
echo "Oops! Looks like you modified some files in dist/. Please remove them from your PR, thanks!"
exit 1
- name: Fail if yarn lock exists
if: steps.check_files.outputs.files_exists == 'true'
run: |
echo "Oops! Looks like you checked in a yarn.lock file, we use npm and package-lock.json. Please remove it from your PR, thanks!"
exit 1