Repository navigation
64 lines (57 loc) · 1.7 KB
/
Copy pathgitarmor-on-demand.yml
File metadata and controls
64 lines (57 loc) · 1.7 KB
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
name: Run GitArmor Action - On-demand
on:
workflow_dispatch:
inputs:
repo:
description: 'Repository name'
required: true
default: 'gitarmor-central'
org:
description: 'Organization name'
required: true
default: 'dearmory'
debug:
description: 'Enable debug output (true/false)'
required: false
default: 'false'
level:
description: 'Level (repository_only, organization_only, organization_and_repository)'
required: true
type: choice
options:
- repository_only
- organization_only
- organization_and_repository
default: 'repository_only'
jobs:
run-gitarmor:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.GITARMOR_APP_ID }}
private-key: ${{ secrets.GITARMOR_APP_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout policies
uses: actions/checkout@v4
- name: Run GitArmor Action
uses: dcodx/gitarmor@main
id: gitarmor
#env:
# DEBUG: true
with:
repo: ${{ github.event.inputs.repo }}
org: ${{ github.event.inputs.org }}
token: ${{ steps.app-token.outputs.token }}
level: ${{ github.event.inputs.level }}
debug: ${{ github.event.inputs.debug }}
policy-dir: "./policies"
- name: Print report to Job summary
run: |
cat output-report.md >> $GITHUB_STEP_SUMMARY
- name: Upload the reports as Actions artifact
uses: actions/upload-artifact@v4
with:
name: gitarmor-evaluation-report
path: output-report.*