Skip to content

Commit c269508

Browse files
authored
Use Fossa action in the workflow (#177)
1 parent 048f132 commit c269508

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

.github/workflows/fossa.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ on:
88
- '**.md'
99
- 'LICENSE'
1010

11-
defaults:
12-
run:
13-
shell: bash
14-
15-
env:
16-
FOSSA_VER: 1.1.6
17-
FOSSA_URL: https://github.com/fossas/fossa-cli/releases/download
18-
1911
jobs:
2012

2113
scan:
@@ -24,23 +16,10 @@ jobs:
2416
steps:
2517
- name: Checkout Repository
2618
uses: actions/checkout@v2
27-
- name: Determine Go version from go.mod
28-
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
29-
- name: Setup Golang Environment
30-
uses: actions/setup-go@v2
19+
- name: Scan
20+
uses: fossas/fossa-action@v1
3121
with:
32-
go-version: ${{ env.GO_VERSION }}
33-
- name: Configure Fossa CLI
34-
run: |
35-
wget ${{ env.FOSSA_URL }}/v${{ env.FOSSA_VER }}/fossa-cli_${{ env.FOSSA_VER }}_linux_amd64.tar.gz
36-
tar xzf fossa-cli_${{ env.FOSSA_VER }}_linux_amd64.tar.gz
37-
./fossa init
38-
- name: Run License Scan
39-
env:
40-
FOSSA_API_KEY: ${{ secrets.FOSSA_TOKEN }}
41-
GO111MODULE: on
42-
GOPATH: /home/runner/go
43-
run: ./fossa analyze -t ${GITHUB_REPOSITORY#*/} -b ${GITHUB_REF##*/}
22+
api-key: ${{ secrets.FOSSA_TOKEN }}
4423

4524
notify:
4625
name: Notify

0 commit comments

Comments
 (0)