Revised NvLink Interfaces scanning #2912
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| name: NICo REST CI | |
| # Trigger on push to main/master or any tag | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - pull-request/[0-9]+ | |
| - feat/** | |
| - fix/** | |
| - chore/** | |
| - hotfix/** | |
| - version/** | |
| tags: | |
| - 'v*.*.*' | |
| workflow_dispatch: # Allow manual trigger | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Step 1: Prepare build information | |
| prepare: | |
| name: Prepare Build Info | |
| uses: ./.github/workflows/prepare-build-info.yml | |
| with: | |
| runner: ubuntu-latest | |
| # Step 2: Lint and Test | |
| lint-and-test: | |
| name: Lint and Test | |
| needs: prepare | |
| uses: ./.github/workflows/lint-and-test.yml | |
| # Step 3: Build Go binaries | |
| build-binaries: | |
| name: Build Go Binaries | |
| needs: | |
| - prepare | |
| - lint-and-test | |
| with: | |
| upload_artifact: true | |
| uses: ./.github/workflows/build-binaries.yml | |
| # Step 4: Security Scan | |
| # Step 4.1: Secret Scan with TruffleHog | |
| security-secret-scan: | |
| name: Secret Scan with TruffleHog | |
| needs: prepare | |
| runs-on: linux-amd64-cpu4 | |
| timeout-minutes: 30 | |
| permissions: | |
| actions: read | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for secret scanning | |
| - name: Run TruffleHog Scan | |
| uses: NVIDIA/dsx-github-actions/.github/actions/trufflehog-scan@f435aa6bf125fe6f9e5ac438f8cef75f90e29a2b | |
| with: | |
| extra-args: '--results=verified,unknown --only-verified' | |
| post-pr-comment: 'true' | |
| fail-on-findings: 'true' | |
| # Step 5: Build and push all Docker images | |
| build-and-push: | |
| name: Build and Push Docker Images | |
| needs: | |
| - prepare | |
| - lint-and-test | |
| # pull-requests: write is required so the security-container-scan-summary | |
| # job inside the reusable workflow can post/update the sticky PR comment. | |
| # security-events: write lets the per-service Grype step upload SARIF to | |
| # GitHub code scanning on main pushes. | |
| permissions: | |
| contents: read | |
| packages: write | |
| pull-requests: write | |
| security-events: write | |
| uses: ./.github/workflows/build-push-docker.yml | |
| with: | |
| runner: ubuntu-latest | |
| semantic_version: ${{ needs.prepare.outputs.semantic_version }} | |
| short_sha: ${{ needs.prepare.outputs.short_sha }} | |
| branch_sha_tag: ${{ needs.prepare.outputs.branch_sha_tag }} | |
| target_registry: ${{ needs.prepare.outputs.target_registry }} | |
| branch_name: ${{ needs.prepare.outputs.branch_name }} | |
| # Pass as string to avoid boolean type conversion issues | |
| is_main_branch: ${{ needs.prepare.outputs.is_main_branch }} | |
| # Images are only pushed for main branch, version tags | |
| push_enabled: ${{ ((github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) && github.event_name == 'push') || needs.prepare.outputs.push_requested == 'true' }} | |
| release_tag: ${{ needs.prepare.outputs.release_tag }} | |
| secrets: | |
| NVCR_USERNAME: ${{ secrets.NVCR_STG_USERNAME }} | |
| NVCR_TOKEN: ${{ secrets.NVCR_STG_TOKEN }} | |
| # Step 6: Helm Charts (detect changes, validate versions, lint/template, push) | |
| helm: | |
| name: Helm Charts | |
| needs: | |
| - prepare | |
| if: ${{ !cancelled() && needs.prepare.result == 'success' }} | |
| uses: ./.github/workflows/helm-workflows.yml | |
| with: | |
| app_version: ${{ needs.prepare.outputs.semantic_version }} | |
| secrets: | |
| NVCR_STG_TOKEN: ${{ secrets.NVCR_STG_TOKEN }} | |
| # Step 7: Promote to release candidate | |
| promote-nico-rest-to-release-candidate: | |
| name: Promote NICo REST to Release Candidate | |
| needs: | |
| - prepare | |
| - lint-and-test | |
| - build-and-push | |
| if: | | |
| github.ref == 'refs/heads/main' || | |
| startsWith(github.ref, 'refs/tags/v') | |
| uses: ./.github/workflows/promotion.yaml | |
| with: | |
| runner: ubuntu-latest | |
| semantic_version: ${{ needs.prepare.outputs.semantic_version }} | |
| build_artifacts: ${{ needs.build-and-push.outputs.build_artifacts }} | |
| secrets: inherit |