diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-10 23:08:13 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-10 23:08:13 +0300 |
| commit | 2192cff82431b98d4df45d4d4d791b9e8692947d (patch) | |
| tree | 54eed6d3a56889482f424e9fe1d176c7261ee2a4 /.github | |
| parent | 63366fb369e91849858e867b1d3fd39a388873a5 (diff) | |
| download | vyos-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')
| -rw-r--r-- | .github/workflows/context7-refresh.yml | 4 |
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 |
