From 2192cff82431b98d4df45d4d4d791b9e8692947d Mon Sep 17 00:00:00 2001 From: Yuriy Andamasov Date: Sun, 10 May 2026 23:08:13 +0300 Subject: ci: add explicit API key presence check before curl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/context7-refresh.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to '.github/workflows') 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 -- cgit v1.2.3