-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.07 KB
/
ci.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: CI
on: workflow_dispatch
jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout [${{ github.repository }}]
uses: actions/checkout@v4
- name: Analyze 1
id: analyze1
uses: ./
with:
api-key: ${{ secrets.API_KEY }}
domain-or-url: securityheaders.com
- name: Check 1
env:
RESULTS_AS_JSON: ${{ steps.analyze1.outputs.results-as-json }}
SUMMARY_AS_JSON: ${{ steps.analyze1.outputs.summary-as-json }}
GRADE: ${{ steps.analyze1.outputs.grade }}
run: |
jq '.' <<<"$RESULTS_AS_JSON"
jq '.' <<<"$SUMMARY_AS_JSON"
echo "GRADE: [$GRADE]"
- name: Analyze 2
id: analyze2
uses: ./
with:
api-key: ${{ secrets.API_KEY }}
domain-or-url: securityheaders.com
follow-redirects: false
hide-results-on-homepage: false
expected-grade: R
- name: Check 2
run: jq '.' <<<'${{ steps.analyze2.outputs.summary-as-json }}'
- name: Analyze 3 (expect to fail due to a lower timeout value)
id: analyze3
continue-on-error: true
uses: ./
with:
api-key: ${{ secrets.API_KEY }}
domain-or-url: securityheaders.com
api-timeout-in-seconds: 0.1
max-retries-on-api-error: 2
- name: Check 3
if: ${{ steps.analyze3.outcome != 'failure' }}
run: jq '.' <<<'${{ steps.analyze3.outputs.summary-as-json }}'
- name: Analyze 4 (expect to fail due to a higher expected grade)
id: analyze4
continue-on-error: true
uses: ./
with:
api-key: ${{ secrets.API_KEY }}
domain-or-url: securityheaders.com
max-retries-on-api-error: 2
expected-grade: A+
- name: Check 4
if: ${{ steps.analyze4.outcome != 'failure' }}
run: jq '.' <<<'${{ steps.analyze4.outputs.summary-as-json }}'