Skip to content

Commit

Permalink
fix: Caller workflow GH_DOCS_TOKEN secret will be injected as called …
Browse files Browse the repository at this point in the history
…workflow input instead of inherited secret, since secrets are not implicitly propagated to called workflow
  • Loading branch information
heyvister1 committed Dec 25, 2024
1 parent da07c79 commit 10740ca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
git_tag:
type: string
description: The git tag (version) from the calling workflow
gh_docs_token:
type: string
description: Assigned nvidia-ci-cd PAT with docs repo r/w pull request permissions

workflow_dispatch:
inputs:
Expand All @@ -17,7 +20,7 @@ jobs:
docs-ci:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_DOCS_TOKEN }}
GH_TOKEN: ${{ inputs.gh_docs_token }}
# keeping TAG for cases docs repo workflow is triggered with tag input
TAG: ${{ inputs.git_tag }}
REF_NAME: ${{ github.ref_name }}
Expand All @@ -30,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/network-operator-docs # repo must be explicitly set here for workflow calling to behave correctly
token: ${{ inputs.token || secrets.GH_DOCS_TOKEN }}
token: ${{ inputs.token || inputs.gh_docs_token }}
- name: Setup Go
uses: actions/[email protected]
with:
Expand Down

0 comments on commit 10740ca

Please sign in to comment.