-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (47 loc) · 1.49 KB
/
scan_go.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
49
50
51
52
53
name: Scan Golang project
on:
push:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "macos-latest", "windows-latest" ]
# Test once with explicit manifest_file, and once without
manifest_file: ["go.mod", ""]
include:
- index: 1
manifest_file: "go.mod"
- index: 2
manifest_file: ""
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
name: Analyse Golang project
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: RHDA Scan
id: rhda_scan
uses: RHEcosystemAppEng/rhda-github-action@main
with:
manifest_directory: manifests/golang
manifest_file: ${{ matrix.manifest_file }}
artifact_filename: ${{ matrix.os }}${{ matrix.index }}-rhda-report
fail_on: never
- name: Print JSON analysis report
if: ${{ always() && steps.rhda_scan.outputs.rhda_report_json }}
run: cat ${{ steps.rhda_scan.outputs.rhda_report_json }}
shell: bash
- name: Print SARIF analysis report
if: ${{ always() && steps.rhda_scan.outputs.rhda_report_sarif }}
run: cat ${{ steps.rhda_scan.outputs.rhda_report_sarif }}
shell: bash
- name: Print Artifact ID
run: echo ${{ steps.rhda_scan.outputs.artifact_id }}