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 <lg@larrygritz.com>
  • Loading branch information
lgritz committed Dec 28, 2024
1 parent bff3377 commit 70da097
Show file tree
Hide file tree
Showing 2 changed files with 7 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
3 changes: 3 additions & 0 deletions .github/workflows/build-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ on:
type: string
nametag:
type: string
secrets:
- GITHUB_TOKEN
- SONAR_TOKEN

permissions: read-all

Expand Down

0 comments on commit 70da097

Please sign in to comment.