From 4d8919101e99373d5d7e3fbf491bc3e44102c308 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Fri, 16 Oct 2020 06:50:07 +0900 Subject: [PATCH 1/2] Use fossa-contrib/fossa-action instead Signed-off-by: Sora Morimoto --- .github/workflows/fossa.yml | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 2429e9e8eb8..4395fe497a9 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -8,20 +8,25 @@ on: jobs: build: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v2 - - uses: actions/setup-go@v2 + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use Go ^1.14.x + uses: actions/setup-go@v2 + with: + go-version: ^1.14.x + + - 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 and upload build analysis + uses: fossa-contrib/fossa-action@v1 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: # FOSSA Push-Only API Token - FOSSA_API_KEY: '304657e2357ba57b416b94e6b119131b' - run: | - export GOPATH=$HOME/go - export PATH=$PATH:$(go env GOPATH)/bin - curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install.sh | bash - fossa init - fossa analyze + fossa-api-key: 304657e2357ba57b416b94e6b119131b + github-token: ${{ github.token }} From 3c241febb454cdbc4d6c26c1a57b1985b227894e Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Fri, 16 Oct 2020 08:00:57 +0900 Subject: [PATCH 2/2] Make step name clearer Signed-off-by: Sora Morimoto --- .github/workflows/fossa.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 4395fe497a9..45e647432a8 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -24,7 +24,7 @@ jobs: - name: Add GOPATH to GITHUB_PATH run: echo "$GOPATH/bin" >>"$GITHUB_PATH" - - name: Run and upload build analysis + - name: Run FOSSA scan and upload build data uses: fossa-contrib/fossa-action@v1 with: # FOSSA Push-Only API Token