Skip to content

Commit e1e3739

Browse files
authored
Use Fossa action in the workflow (#87)
1 parent d33bd79 commit e1e3739

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
@@ -7,14 +7,6 @@ on:
77
paths-ignore:
88
- '**.md'
99

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

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

4423
notify:
4524
name: Notify

0 commit comments

Comments
 (0)