Skip to content

Commit

Permalink
fixup: check env secrets and outputs
Browse files Browse the repository at this point in the history
Pass FOSSA_API_KEY secret from caller to check_env
Pass HAS_FOSSA_API_KEY output form check_end to caller
  • Loading branch information
elaguerta-nr committed May 27, 2024
1 parent fce066b commit ebcdb2d
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/fossa-caos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
check_env:
uses: newrelic-csec/.github/.github/workflows/fossa-check-env.yml@reusable
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

fossa:
needs: check_env
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/fossa-check-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
secrets:
FOSSA_API_KEY:
required: false
outputs:
HAS_FOSSA_API_KEY:
description: "True if FOSSA API key is available."
value: ${{ jobs.check_env.outputs.check }}

jobs:
check_env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/fossa-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: FOSSA CLI Analysis - Default
on:
pull_request:
branches: [ $default-branch ]
workflow_call:

jobs:
check_env:
uses: newrelic-csec/.github/.github/workflows/fossa-check-env.yml@reusable
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

fossa:
needs: check_env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fossa-elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
check_env:
uses: newrelic-csec/.github/.github/workflows/fossa-check-env.yml@reusable
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

fossa:
needs: check_env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fossa-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
check_env:
uses: newrelic-csec/.github/.github/workflows/fossa-check-env.yml@reusable
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

fossa:
needs: check_env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fossa-ruby-bundler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
check_env:
uses: newrelic-csec/.github/.github/workflows/fossa-check-env.yml@reusable
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

fossa_ruby:
needs: check_env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/fossa-scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
jobs:
check_env:
uses: newrelic-csec/.github/.github/workflows/fossa-check-env.yml@reusable
secrets:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}

fossa:
needs: check_env
Expand Down

0 comments on commit ebcdb2d

Please sign in to comment.