Skip to content

Commit

Permalink
ci: Only give build-steps the secrets it needs
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Dec 28, 2024
1 parent bff3377 commit 07ff743
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ jobs:
# account credentials.
if: github.repository == 'AcademySoftwareFoundation/OpenImageIO'
uses: ./.github/workflows/build-steps.yml
# Must let the called steps workflow inherit our secrets
secrets: inherit
# Must let the called steps workflow inherit necessary secrets
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
nametag: ${{ matrix.nametag || 'unnamed!' }}
runner: ${{ matrix.runner || 'ubuntu-latest' }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ on:
type: string
nametag:
type: string
secrets:
GITHUB_TOKEN:
required: false
SONAR_TOKEN:
required: false

permissions: read-all

Expand Down

0 comments on commit 07ff743

Please sign in to comment.