-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
40 lines (40 loc) · 1.36 KB
/
action.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
name: 'sarif-orchestrator-action'
description: 'Adaptation of sarif-orchestrator to a GitHub Action'
inputs:
config-dir:
description: 'Configuration directory'
required: true
config-file:
description: 'Run file'
required: true
type-reporting:
description: 'Type of reporting'
required: true
runs:
using: "composite"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: main
repository: barroqueiro/sarif-orchestrator
path: sarif-orchestrator
- run: mv sarif-orchestrator ..
shell: bash
- run: |
mkdir /tmp/output /tmp/output/Reporting /tmp/output/Reports
touch .env
echo "ORCHESTRATOR_INPUT_HOST_DIR=$(pwd)" >> .env
echo "ORCHESTRATOR_OUTPUT_HOST_DIR=/tmp/output" >> .env
echo "REPORT_INPUT_HOST_DIR=/tmp/output/Reporting" >> .env
echo "REPORT_OUTPUT_HOST_DIR=/tmp/output/Reports" >> .env
echo "ORCHESTRATOR_CONFIG_FILE=${{ inputs.config-file }}" >> .env
echo "REPORT_TYPE=${{ inputs.type-reporting }}" >> .env
echo "CONFIG_HOST_DIR=$(pwd)/${{ inputs.config-dir }}" >> .env
mv .env ../sarif-orchestrator/docker
cd ../sarif-orchestrator/docker
cat .env
docker-compose build
docker-compose up orchestrator
docker-compose up report
shell: bash