Unverified Commit 57af13c7 authored by Alexander Poddubny's avatar Alexander Poddubny Committed by GitHub

Fixes CI problem for forks (#540)

Fixing CI problem for forks by setting default values and handling empty
secrets
parent 58fb6b14
...@@ -31,7 +31,15 @@ runs: ...@@ -31,7 +31,15 @@ runs:
- name: NGC Login - name: NGC Login
shell: sh shell: sh
run: | run: |
docker login -u \$oauthtoken -p ${{ env.NGC_API_KEY }} nvcr.io # Only attempt NGC login if API key is available
if [ -n "${{ env.NGC_API_KEY }}" ]; then
echo "Logging into NGC registry..."
docker login -u \$oauthtoken -p ${{ env.NGC_API_KEY }} nvcr.io
echo "✅ Successfully logged into NGC registry"
else
echo "⚠️ NGC_API_KEY not available - skipping NGC login"
echo "This is normal for PRs from forks or when secrets are not configured"
fi
- name: Build Docker Image - name: Build Docker Image
shell: sh shell: sh
......
...@@ -23,8 +23,8 @@ permissions: ...@@ -23,8 +23,8 @@ permissions:
env: env:
NGC_API_KEY: ${{ secrets.NGC_API_KEY }} NGC_API_KEY: ${{ secrets.NGC_API_KEY }}
ISAACSIM_BASE_IMAGE: ${{ vars.ISAACSIM_BASE_IMAGE }} ISAACSIM_BASE_IMAGE: ${{ vars.ISAACSIM_BASE_IMAGE || 'nvcr.io/nvidia/isaac-sim' }}
ISAACSIM_BASE_VERSION: ${{ vars.ISAACSIM_BASE_VERSION }} ISAACSIM_BASE_VERSION: ${{ vars.ISAACSIM_BASE_VERSION || '4.5.0' }}
DOCKER_IMAGE_TAG: isaac-lab-dev:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}-${{ github.sha }} DOCKER_IMAGE_TAG: isaac-lab-dev:${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}-${{ github.sha }}
jobs: jobs:
...@@ -52,7 +52,7 @@ jobs: ...@@ -52,7 +52,7 @@ jobs:
git lfs install git lfs install
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
lfs: true lfs: true
...@@ -114,7 +114,7 @@ jobs: ...@@ -114,7 +114,7 @@ jobs:
git lfs install git lfs install
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
lfs: true lfs: true
...@@ -172,7 +172,7 @@ jobs: ...@@ -172,7 +172,7 @@ jobs:
git lfs install git lfs install
- name: Checkout Code - name: Checkout Code
uses: actions/checkout@v3 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
lfs: false lfs: false
......
...@@ -45,7 +45,15 @@ jobs: ...@@ -45,7 +45,15 @@ jobs:
- name: Login to NGC - name: Login to NGC
run: | run: |
docker login -u \$oauthtoken -p ${{ env.NGC_API_KEY }} nvcr.io # Only attempt NGC login if API key is available
if [ -n "${{ env.NGC_API_KEY }}" ]; then
echo "Logging into NGC registry..."
docker login -u \$oauthtoken -p ${{ env.NGC_API_KEY }} nvcr.io
echo "✅ Successfully logged into NGC registry"
else
echo "⚠️ NGC_API_KEY not available - skipping NGC login"
echo "This is normal when secrets are not configured"
fi
- name: Build and Push Docker Images - name: Build and Push Docker Images
run: | run: |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment