-
Notifications
You must be signed in to change notification settings - Fork 176
Add nvskills ci workflow #1246
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
Add nvskills ci workflow #1246
Changes from all commits
020119c
8c9f714
da38fb2
0039e70
c97e6dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Triggered when a maintainer/admin comments `/nvskills-ci` on a PR | ||
| # touching skills/. The bot pushes a signature commit that must remain | ||
| # in the PR before merge. Fork-based PRs are not supported. | ||
|
|
||
| name: Request NVSkills CI | ||
|
|
||
| on: | ||
| issue_comment: | ||
| types: [created] | ||
| push: | ||
|
|
||
| jobs: | ||
| request: | ||
| if: > | ||
| (github.event_name == 'issue_comment' && | ||
| github.event.issue.pull_request && | ||
| startsWith(github.event.comment.body, '/nvskills-ci')) || | ||
| (github.event_name == 'push' && | ||
| github.actor == (vars.NVSKILLS_SIGNATURE_PUSH_ACTOR || 'nv-nvskill-ci[bot]') && | ||
| startsWith(github.event.head_commit.message, vars.NVSKILLS_SIGNATURE_COMMIT_TITLE || 'Attach NVSkills validation signatures')) | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| uses: NVIDIA/skills/.github/workflows/team-request.yml@main | ||
| secrets: | ||
| NVSKILLS_CI_DISPATCH_TOKEN: ${{ secrets.NVSKILLS_CI_DISPATCH_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,4 +6,5 @@ rules: | |||||
| # rapidsai/shared-workflows and rapidsai/shared-actions | ||||||
| "rapidsai/shared-workflows/*": any | ||||||
| "rapidsai/shared-actions/*": any | ||||||
| "NVIDIA/skills/*": any | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n .github/zizmor.yml | head -20Repository: NVIDIA/cuopt Length of output: 466 🏁 Script executed: # Get full context of the zizmor.yml file
wc -l .github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 78 🏁 Script executed: # Search for any references to NVIDIA/skills in the codebase
rg "NVIDIA/skills" --type yaml --type ymlRepository: NVIDIA/cuopt Length of output: 84 🏁 Script executed: # Check git history to understand what changed
git diff HEAD~1 .github/zizmor.yml 2>/dev/null || git log --oneline -5 .github/zizmor.yml 2>/dev/nullRepository: NVIDIA/cuopt Length of output: 114 🏁 Script executed: # Search for NVIDIA/skills usage in workflow files
rg "NVIDIA/skills" .github/workflows/Repository: NVIDIA/cuopt Length of output: 162 🏁 Script executed: # Get the diff for this file to see what changed
git diff -- .github/zizmor.yml || git show HEAD:.github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 38 🏁 Script executed: # List all workflow files to understand the context
find .github/workflows -type f -name "*.yml" -o -name "*.yaml"Repository: NVIDIA/cuopt Length of output: 587 🏁 Script executed: # Check if there are multiple NVIDIA/skills workflows referenced
rg "uses:.*NVIDIA/skills" .github/ -A 2Repository: NVIDIA/cuopt Length of output: 335 🏁 Script executed: # Check git status to see if this file is modified in current PR
git status .github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 122 🏁 Script executed: # Get the actual diff for the PR
git diff .github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 38 🏁 Script executed: # Check the git log to see when this line was added
git log -p --all -- .github/zizmor.yml | grep -A 5 -B 5 "NVIDIA/skills" | head -30Repository: NVIDIA/cuopt Length of output: 38 🏁 Script executed: # Check the complete git history to understand when this line was introduced
git log --all --oneline .github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 200 🏁 Script executed: # Check if maybe this is a new file in the PR
git show HEAD:.github/zizmor.yml 2>/dev/null | head -15Repository: NVIDIA/cuopt Length of output: 396 🏁 Script executed: # Let's check all branches to see the change context
git branch -aRepository: NVIDIA/cuopt Length of output: 154 🏁 Script executed: # Search for any other NVIDIA references that might justify the wildcard
rg "NVIDIA/" .github/workflows/ | grep -v "^Binary"Repository: NVIDIA/cuopt Length of output: 314 🏁 Script executed: # Check if this line was added in the recent commit
git show 73c9903:.github/zizmor.yml | grep -A 3 -B 3 "NVIDIA/skills"Repository: NVIDIA/cuopt Length of output: 38 🏁 Script executed: # Check the parent commit to see if it existed before
git show 73c9903^:.github/zizmor.yml 2>/dev/null | grep "NVIDIA/skills" || echo "Line did not exist in parent"Repository: NVIDIA/cuopt Length of output: 85 🏁 Script executed: # Verify the exact change in that commit
git show 73c9903 -- .github/zizmor.yml | head -50Repository: NVIDIA/cuopt Length of output: 1330 🏁 Script executed: # Double-check what commit is currently at HEAD
git log -1 --onelineRepository: NVIDIA/cuopt Length of output: 114 🏁 Script executed: # Check if there were changes to zizmor.yml after the initial commit
git log --all --oneline -- .github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 200 🏁 Script executed: # Verify the current state is different from the initial commit
git diff 73c9903 HEAD -- .github/zizmor.ymlRepository: NVIDIA/cuopt Length of output: 418 Scope the unpinned exception to the exact NVIDIA/skills workflow path. The policy Suggested fix- "NVIDIA/skills/*": any
+ "NVIDIA/skills/.github/workflows/team-request.yml": any📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| "*": hash-pin | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add commenter authorization to the
issue_commenttrigger path.The condition currently accepts any PR comment starting with
/nvskills-ci, but it does not enforce maintainer/admin permissions as described in the header comment. That allows unauthorized users to trigger this workflow.Suggested fix
if: > (github.event_name == 'issue_comment' && github.event.issue.pull_request && - startsWith(github.event.comment.body, '/nvskills-ci')) || + contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association) && + startsWith(github.event.comment.body, '/nvskills-ci')) || (github.event_name == 'push' && github.actor == (vars.NVSKILLS_SIGNATURE_PUSH_ACTOR || 'nv-nvskill-ci[bot]') && startsWith(github.event.head_commit.message, vars.NVSKILLS_SIGNATURE_COMMIT_TITLE || 'Attach NVSkills validation signatures'))📝 Committable suggestion
🤖 Prompt for AI Agents