Skip to content

Use Fossa action in the workflow #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 3 additions & 24 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ on:
paths-ignore:
- '**.md'

defaults:
run:
shell: bash

env:
FOSSA_VER: 1.1.6
FOSSA_URL: https://github.com/fossas/fossa-cli/releases/download

jobs:

scan:
Expand All @@ -23,23 +15,10 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Setup Golang Environment
uses: actions/setup-go@v2
- name: Scan
uses: fossas/fossa-action@v1
with:
go-version: ${{ env.GO_VERSION }}
- name: Configure Fossa CLI
run: |
wget ${{ env.FOSSA_URL }}/v${{ env.FOSSA_VER }}/fossa-cli_${{ env.FOSSA_VER }}_linux_amd64.tar.gz
tar xzf fossa-cli_${{ env.FOSSA_VER }}_linux_amd64.tar.gz
./fossa init
- name: Run License Scan
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_TOKEN }}
GO111MODULE: on
GOPATH: /home/runner/go
run: ./fossa analyze -t ${GITHUB_REPOSITORY#*/} -b ${GITHUB_REF##*/}
api-key: ${{ secrets.FOSSA_TOKEN }}

notify:
name: Notify
Expand Down