-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
46 lines (39 loc) · 1003 Bytes
/
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
41
42
43
44
45
46
name: 'Go License Checker'
author: 'yusufpapurcu'
description: 'Check licenses in your go package'
inputs:
runVendor:
description: "If set false, action won't do `go mod vendor`"
default: true
branding:
icon: file-text
color: green
runs:
using: "composite"
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- run: |
if echo ${{ inputs.runVendor }} | grep -c "true"
then
go mod vendor
else
echo "Skipping Vendoring Step"
fi
shell: bash
- name: Run go mod vendor
if: inputs.runVendor == 'true'
run: go mod vendor
shell: bash
- name: Get google/go-licenses package
run: go install github.com/google/go-licenses@latest
shell: bash
- name: Run Check
run: ${{ github.action_path }}/check.sh
shell: bash
- name: Get them as csv
run: go-licenses csv .
shell: bash