diff --git a/.github/workflows/check-notebook-license.yml b/.github/workflows/check-notebook-license.yml index d6a6a8e..cf0a0c2 100644 --- a/.github/workflows/check-notebook-license.yml +++ b/.github/workflows/check-notebook-license.yml @@ -2,7 +2,7 @@ name: Check Notebook License Footers on: pull_request: - branches: ['main'] + branches: ['main', 'staging'] types: [opened, reopened, ready_for_review, synchronize] workflow_dispatch: diff --git a/.github/workflows/check-notebook-outputs.yml b/.github/workflows/check-notebook-outputs.yml index b2f993b..f31e4ae 100644 --- a/.github/workflows/check-notebook-outputs.yml +++ b/.github/workflows/check-notebook-outputs.yml @@ -2,7 +2,7 @@ name: Check Notebook Outputs on: pull_request: - branches: ['main'] + branches: ['main', 'staging'] types: [opened, reopened, ready_for_review, synchronize] workflow_dispatch: diff --git a/.github/workflows/execute-notebooks.yml b/.github/workflows/execute-notebooks.yml index d3f6905..398a3e7 100644 --- a/.github/workflows/execute-notebooks.yml +++ b/.github/workflows/execute-notebooks.yml @@ -2,7 +2,7 @@ name: Execute Notebooks on: pull_request: - branches: ['main'] + branches: ['main', 'staging'] types: [opened, reopened, ready_for_review, synchronize] workflow_dispatch: @@ -70,6 +70,14 @@ jobs: continue fi + # Skip notebooks that authenticate with the qBraid API when no key is + # available (secrets are not exposed to pull_request runs from forks) + if [ -z "$QBRAID_API_KEY" ] && grep -qE "QbraidProvider|QbraidClient" "$nb"; then + summary="${summary}| ${name} | :white_circle: SKIPPED (no API key on fork PRs) |\n" + skipped=$((skipped + 1)) + continue + fi + echo "::group::Executing $nb" if .venv/bin/jupyter nbconvert --to notebook --execute \ --ExecutePreprocessor.kernel_name=notebook-env \ diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index f83b3a0..0486dc1 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -2,7 +2,7 @@ name: Format on: pull_request: - branches: ['main'] + branches: ['main', 'staging'] types: [opened, reopened, ready_for_review, synchronize] workflow_dispatch: