Skip to content

Commit

Permalink
Merge pull request #56 from newrelic/fossa-team
Browse files Browse the repository at this point in the history
specify team name for fossa analyze
  • Loading branch information
elaguerta-nr committed May 22, 2024
2 parents 8ee98d8 + 676aea0 commit 1023198
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 30 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/fossa-caos.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: FOSSA CLI Analysis
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:

jobs:
check_env:
Expand All @@ -19,7 +16,7 @@ jobs:

fossa:
needs: check_env
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
Expand Down Expand Up @@ -71,7 +68,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALYZE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALYZE_ERR_FILE || true
fossa analyze --team='Service Accounts' --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALYZE_ERR_FILE || true
if [[ $(grep "ERROR" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/fossa-default.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: FOSSA CLI Analysis
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:

jobs:
check_env:
Expand All @@ -19,7 +16,7 @@ jobs:

fossa:
needs: check_env
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
Expand Down Expand Up @@ -67,7 +64,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALYZE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALYZE_ERR_FILE || true
fossa analyze --team='Service Accounts' --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALYZE_ERR_FILE || true
if [[ $(grep "ERROR" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/fossa-elixir.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: FOSSA CLI Analysis
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:

jobs:
check_env:
Expand All @@ -19,7 +16,7 @@ jobs:

fossa:
needs: check_env
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
Expand Down Expand Up @@ -71,7 +68,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
fossa analyze --team='Service Accounts' --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/fossa-gradle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: FOSSA CLI Analysis
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:

jobs:
check_env:
Expand All @@ -19,7 +16,7 @@ jobs:

fossa:
needs: check_env
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
Expand Down Expand Up @@ -90,7 +87,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
fossa analyze --team='Service Accounts' --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/fossa-ruby-bundler.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: FOSSA CLI Analysis
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:

jobs:
check_env:
Expand All @@ -19,7 +16,7 @@ jobs:

fossa:
needs: check_env
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
Expand Down Expand Up @@ -70,7 +67,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
fossa analyze --team='Service Accounts' --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/fossa-scala.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: FOSSA CLI Analysis - Scala
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:

jobs:
check_env:
Expand All @@ -19,7 +16,7 @@ jobs:

fossa:
needs: check_env
if: ${{ needs.check_env.HAS_FOSSA_API_KEY }}
if: ${{ needs.check_env.outputs.HAS_FOSSA_API_KEY == 'true' }}
runs-on: ubuntu-latest
env:
FOSSA_API_KEY: ${{secrets.FOSSA_API_KEY}}
Expand Down Expand Up @@ -72,7 +69,7 @@ jobs:
run: |
export ANALYZE_OUT_FILE=${{ runner.temp }}/analyze_out.txt
export ANALZYE_ERR_FILE=${{ runner.temp }}/analyze_err.txt
fossa analyze --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
fossa analyze --team='Service Accounts' --policy='New Relic Public Github' 1>$ANALYZE_OUT_FILE 2>$ANALZYE_ERR_FILE || true
if [[ $(grep -i "error" $ANALYZE_ERR_FILE | wc -l) -gt 0 ]]
then
echo "::error::fossa analyze ran with errors."
Expand Down

0 comments on commit 1023198

Please sign in to comment.