Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fixing non-propagated custom GH token in forked PRs #134

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
docs-ci:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
GH_TOKEN: ${{ secrets.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 +30,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_TOKEN_NVIDIA_CI_CD }} # token must be explicitly set here for push to work in following step
token: ${{ inputs.token || secrets.GH_DOCS_TOKEN }}
- name: Setup Go
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -65,7 +65,8 @@ jobs:
run: |
git config user.name nvidia-ci-cd
git config user.email [email protected]
gh repo fork --remote --default-branch-only
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to fork docs repo, since there is already an existing fork for nvidia-ci-cd user

export GH_TOKEN=${{ env.GH_TOKEN }}

gh repo sync $DOWNSTREAM_REPO_OWNER/network-operator-docs --source $UPSTREAM_REPO_OWNER/network-operator-docs --branch $UPSTREAM_DEFAULT_BRANCH
git checkout -b $DOWNSTREAM_FEATURE_BRANCH
git add docs
Expand Down