-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (43 loc) · 1.55 KB
/
go.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: Build, test, deploy
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]
jobs:
build:
name: Build, test, deploy
runs-on: "ubuntu-latest"
env:
CF_USERNAME: ${{ secrets.deployerusername }}
CF_PASSWORD: ${{ secrets.deployerpw }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Lint Code Base
uses: docker://github/super-linter:latest
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build and test
run: docker-compose run --rm api make && echo "Completed Build and test"
- name: Build for scan
if: ${{ success() }}
run: docker-compose up -d && echo "Completed Build for scan"
- name: ZAP Scan
if: ${{ success() }}
uses: zaproxy/action-baseline@v0.3.0
with:
target: 'http://localhost:9080'
cmd_options: '-I' # Don't fail on WARNings
- name: clean up after scan
run: docker-compose down && echo "Completed clean up after scan"
- name: Make the cloudgov-deploy script executable
#Included condition to deploy if this is a git push
if: ${{ success() && github.event_name == 'push' }}
run: chmod +x ./bin/deploy-cloudgov && echo "Make the cloudgov-deploy script executable"
- name: Deploy the app to cloud.gov
#Included condition to deploy if this is a git push
if: ${{ success() && github.event_name == 'push' }}
run: ./bin/deploy-cloudgov && echo "Deploy"