#186 - Cannot collapse Tasks Filters as Guest user in Local Deploymen… #129
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) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |
| # | |
| # 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. | |
| # | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Update Submodule | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main # Triggers when changes are merged into main branch | |
| jobs: | |
| trigger-gitlab: | |
| runs-on: self-hosted | |
| environment: | |
| name: update-submodule | |
| steps: | |
| - name: Trigger Submodule Update | |
| env: | |
| GITLAB_TRIGGER_TOKEN: ${{ secrets.GITLAB_TRIGGER_TOKEN }} | |
| GITLAB_PROJECT_ID: ${{ secrets.GITLAB_PROJECT_ID }} | |
| GITLAB_API_URL: ${{ secrets.GITLAB_API_URL }} | |
| run: | | |
| echo "Triggering GitLab pipeline for commit: ${{ github.sha }}" | |
| RESPONSE=$(curl -X POST \ | |
| -F token="${GITLAB_TRIGGER_TOKEN}" \ | |
| -F ref="${{ github.ref_name }}" \ | |
| -F "variables[GITHUB_COMMIT_SHA]=${{ github.sha }}" \ | |
| -F "variables[TRIGGER_SOURCE]=github_main_merge" \ | |
| -F "variables[GITHUB_REPO]=${{ github.repository }}" \ | |
| -w "\n%{http_code}" \ | |
| "${GITLAB_API_URL}/projects/${GITLAB_PROJECT_ID}/trigger/pipeline") | |
| HTTP_CODE=$(echo "$RESPONSE" | tail -n1) | |
| if [ "$HTTP_CODE" -ge 200 ] && [ "$HTTP_CODE" -lt 300 ]; then | |
| echo "✅ Successfully triggered GitLab pipeline" | |
| else | |
| echo "❌ Failed to trigger GitLab pipeline" | |
| echo "HTTP Status: $HTTP_CODE" | |
| exit 1 | |
| fi | |
| - name: Log trigger details | |
| if: success() | |
| run: | | |
| echo "Triggered GitLab pipeline" | |
| echo "GitHub Commit: ${{ github.sha }}" | |
| echo "Triggered By: ${{ github.actor }}" | |
| - name: Report failure | |
| if: failure() | |
| run: | | |
| echo "❌ Failed to trigger GitLab pipeline" | |
| echo "GitHub Commit: ${{ github.sha }}" | |
| echo "Please check the workflow logs and GitLab configuration" |