-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.65 KB
/
docker-build.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
53
54
55
56
name: Docker Build
on:
push:
branches: [master]
paths:
- '.dockerignore'
- '.github/workflows/docker-build.yml'
- 'Dockerfile'
- 'entrypoint.sh'
pull_request:
paths:
- '.dockerignore'
- '.github/workflows/docker-build.yml'
- 'Dockerfile'
- 'entrypoint.sh'
jobs:
DockerBuild:
name: Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Docker Build
run: docker build -t action-stringslint .
- name: Exit Status on Errors
run: |
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-stringslint &>/dev/null; echo $?)
[[ $STATUS == "2" ]]
working-directory: ./test/ErrorProject
shell: bash
- name: Exit Status on Warning
run: |
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-stringslint &>/dev/null; echo $?)
[[ $STATUS == "0" ]]
working-directory: ./test/WarningProject
shell: bash
- name: Output on Clean
run: |
STATUS=$(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-stringslint &>/dev/null; echo $?)
[[ $STATUS == "0" ]]
working-directory: ./test/CleanProject
shell: bash
- name: Output on Warning
run: diff <(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-stringslint | sort -u) expected.txt
working-directory: ./test/WarningProject
shell: bash
- name: Output on Error
run: diff <(docker run -v $(pwd):$(pwd) -w $(pwd) --rm action-stringslint | sort -u) expected.txt
working-directory: ./test/ErrorProject
shell: bash