-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.75 KB
/
ci-test.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
- name: Run the app
run: docker-compose up -d
- name: Test app
run: |
NAME=$(docker run --network crud-app_default saltaaron/just-httpie GET crud-app:3000/users/1 | docker run -i --network crud-app_default saltaaron/just-jq -r '.[].name')
if [ $NAME != 'Marcia' ] ; then
echo "The expected name was not returned. $NAME was returned instead."
exit 1;
fi
- name: Test TLS
run: |
NAME=$(docker run --network crud-app_default saltaaron/just-httpie GET https://crud-app:3443/users/2 --verify no | docker run -i --network crud-app_default saltaaron/just-jq -r '.[].name')
if [ $NAME != 'Amy' ] ; then
echo "The expected name was not returned. $NAME was returned instead."
exit 1;
fi
# - name: Debug
# run: |
# pwd
# ls -l /home/runner/work/crud-app/crud-app/
- name: Get Repository ID
id: repo_id
run: echo "::set-output name=repo_id::$(curl -sH -X https://api.github.com/repos/${{ github.repository }} | jq -r .id)"
- name: Run CUSTOMIZED OX Security Scan to check for vulnerabilities
# - name: Run OX Security Scan to check for vulnerabilities
# with:
# ox_api_key: ${{ secrets.OX_API_KEY }}
# ox_timeout: 1
# ox_fail_on_timeout: true
env:
GITHUB_REPOSITORY_ID: ${{ steps.repo_id.outputs.repo_id }}
run: |
echo "Repository ID: ${{ steps.repo_id.outputs.repo_id }}"
${{ github.workspace }}/.github/workflows/custom-ox.sh
# uses: oxsecurity/ox-security-scan@main