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

fix: refactor docs-ci downstream trigger to operate via workflow_dispatch only #1258

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
19 changes: 14 additions & 5 deletions .github/workflows/docs-ci-trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ on:
- "v*"

jobs:
trigger_downstream_workflow:
uses: Mellanox/network-operator-docs/.github/workflows/docs-ci.yaml@main
with:
git_tag: ${{ github.ref_name }}
secrets: inherit
call_docs_ci_downstream_workflow:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN_NVIDIA_CI_CD }}
GIT_TAG: ${{ github.ref_name }}
Copy link
Member

Choose a reason for hiding this comment

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

Note that in doc CI we also need:

 env:
        NGC_CLI_API_KEY: ${{ secrets.NVCR_TOKEN }}

https://github.com/Mellanox/network-operator-docs/blob/main/.github/workflows/docs-ci.yaml#L35

steps:
- run: |
gh workflow run docs-ci.yaml \
--repo ${{ github.repository_owner }}/network-operator-docs \
--ref main \
--field git_tag=$GIT_TAG
gh run list --repo ${{ github.repository_owner }}/network-operator-docs --branch feature/docs-ci-refactor --workflow docs-ci.yaml --json url -q '.[0].url' # print downstream workflow's last run URL
run_id=$(gh run list --repo ${{ github.repository_owner }}/network-operator-docs --branch feature/docs-ci-refactor --workflow docs-ci.yaml --json databaseId -q '.[0].databaseId')
gh run watch $run_id --repo ${{ github.repository_owner }}/network-operator-docs --exit-status # set exit code based on downstream workflow's result
Loading