-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (73 loc) · 2.42 KB
/
test-mondoo-prod.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
77
name: 'TEST: Mondoo Production Regions'
on:
workflow_dispatch:
schedule:
- cron: '15,45 * * * *'
jobs:
asset_scan:
name: Docker Asset Scan
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create US Mondoo Config
run: |
echo ${{ secrets.MONDOO_CONFIG_US }} | base64 -d > mondoo-config.yaml
- name: Pull mondoo/client Image
run: |
docker pull mondoo/client
- name: Perform scan
run: |
docker run -v `pwd`/mondoo-config.yaml:/root/.config/mondoo/mondoo.yml --rm mondoo/client scan local
- name: Create EU Mondoo Config
run: |
echo ${{ secrets.MONDOO_CONFIG_EU }} | base64 -d > mondoo-config.yaml
- name: Perform scan
run: |
docker run -v `pwd`/mondoo-config.yaml:/root/.config/mondoo/mondoo.yml --rm mondoo/client scan local
- name: Discord notification
uses: Ilshidur/[email protected]
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: ':rotating_light: :zap: :warning: Oh no! Simmons says: The docker scan test failed!'
console_test:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
region: [US, EU]
steps:
- uses: actions/checkout@v3
- id: region
uses: ASzc/change-string-case-action@v5
with:
string: ${{ matrix.region }}
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: yarn
- name: Install Playwright Browsers
run: yarn playwright install chromium --with-deps
- name: Run Playwright tests
run: yarn playwright test
env:
MONDOO_USER: ${{ secrets.MONDOO_USER }}
MONDOO_PASSWORD: ${{ secrets.MONDOO_PASSWORD }}
REGION: ${{ matrix.region }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: simmons-playwright-report
path: results/
retention-days: 14
- name: Discord notification
uses: Ilshidur/[email protected]
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: ':rotating_light: :zap: :warning: Oh no! Simmons says: The ${{ matrix.region}} :flag_${{ steps.region.outputs.lowercase }}: console test failed! -> ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} '