forked from rajaSahil/gh-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
48 lines (45 loc) · 1.34 KB
/
action.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
name: test-install
description: 'Install accuknox-cli, kubearmor and discovery engine '
inputs:
action: # id of input
description: 'Which action to perform'
required: true
default: 'install'
outputs:
random-number:
description: "Random number"
value: ${{ steps.random-number-generator.outputs.random-number }}
runs:
using: "composite"
steps:
- name: Checkout accuknox-cli repo
uses: actions/checkout@v3
with:
repository: rajaSahil/accuknox-cli
ref: feat-report
path: accuknox-cli
- if: ${{ inputs.action == 'install' }}
run: |
cd accuknox-cli
./accuknox-cli version
./accuknox-cli install
shell: bash
- if: ${{ inputs.action == 'report' }}
run: |
kubectl get pods -A
sleep 200
kubectl get pods -A
mkdir downloads
touch table
./accuknox-cli/accuknox-cli report -b "baseline/report.json" > downloads/table
cat downloads/table
mv /tmp/report-*.json downloads/report.json
mv /tmp/diff-report-*.json downloads/diff-report.json
mv /tmp/diff-report-*.md downloads/diff-report.md
shell: bash
- if: ${{ inputs.action == 'report' }}
name: Upload artifects
uses: actions/upload-artifact@v2
with:
name: Baseline report
path: downloads