summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-10 23:08:13 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-10 23:08:13 +0300
commit2192cff82431b98d4df45d4d4d791b9e8692947d (patch)
tree54eed6d3a56889482f424e9fe1d176c7261ee2a4 /.github/workflows
parent63366fb369e91849858e867b1d3fd39a388873a5 (diff)
downloadvyos-documentation-2192cff82431b98d4df45d4d4d791b9e8692947d.tar.gz
vyos-documentation-2192cff82431b98d4df45d4d4d791b9e8692947d.zip
ci: add explicit API key presence check before curl
If CONTEXT7_API_KEY is unset or empty (e.g. secret not yet configured), emit a clear error message rather than letting curl fail with a generic auth error. The `:-` guard is needed because `set -u` would otherwise abort before the `-z` test when the variable is truly unset. 🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/context7-refresh.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.github/workflows/context7-refresh.yml b/.github/workflows/context7-refresh.yml
index 5c7e2f41..9489b55e 100644
--- a/.github/workflows/context7-refresh.yml
+++ b/.github/workflows/context7-refresh.yml
@@ -51,6 +51,10 @@ jobs:
DISPATCH_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
+ if [[ -z "${CONTEXT7_API_KEY:-}" ]]; then
+ echo "ERROR: CONTEXT7_API_KEY is unset or empty" >&2
+ exit 1
+ fi
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
VARIANT="$DISPATCH_VERSION"
else