From c51a2c34ef620496136caa8cb801087966eca4e7 Mon Sep 17 00:00:00 2001 From: Jacek Date: Thu, 26 Mar 2026 07:42:29 -0500 Subject: [PATCH] fix(ci): warn instead of fail on missing turbo env vars for forks --- .changeset/warm-turbo-forks.md | 2 ++ .github/actions/init-blacksmith/action.yml | 22 ++++++++++++---------- .github/actions/init/action.yml | 22 ++++++++++++---------- 3 files changed, 26 insertions(+), 20 deletions(-) create mode 100644 .changeset/warm-turbo-forks.md diff --git a/.changeset/warm-turbo-forks.md b/.changeset/warm-turbo-forks.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/warm-turbo-forks.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/actions/init-blacksmith/action.yml b/.github/actions/init-blacksmith/action.yml index 0d733497495..fba1064209c 100644 --- a/.github/actions/init-blacksmith/action.yml +++ b/.github/actions/init-blacksmith/action.yml @@ -26,10 +26,10 @@ inputs: required: false turbo-team: description: 'The team to use for Turbo remote auth' - required: true + required: false turbo-token: description: 'The token to use for Turbo remote auth' - required: true + required: false registry-url: description: 'The registry the packages will be published to' required: false @@ -82,15 +82,17 @@ runs: ) if (ENABLED === 'true') { - if (!TEAM) { - throw new Error('turbo-team input is required and must not be empty') - } - if (!TOKEN) { - throw new Error('turbo-token input is required and must not be empty') + const missing = [] + if (!TEAM) missing.push('turbo-team') + if (!TOKEN) missing.push('turbo-token') + + if (missing.length > 0) { + core.warning(`Missing Turbo remote cache credentials: ${missing.join(', ')}. Turbo remote caching will be disabled.`) + } else { + core.exportVariable('TURBO_CACHE', CACHE) + core.exportVariable('TURBO_TEAM', TEAM) + core.exportVariable('TURBO_TOKEN', TOKEN) } - core.exportVariable('TURBO_CACHE', CACHE) - core.exportVariable('TURBO_TEAM', TEAM) - core.exportVariable('TURBO_TOKEN', TOKEN) } if (SIGNATURE && SIGNATURE !== '') { diff --git a/.github/actions/init/action.yml b/.github/actions/init/action.yml index edc9306138f..849c5ca0255 100644 --- a/.github/actions/init/action.yml +++ b/.github/actions/init/action.yml @@ -26,10 +26,10 @@ inputs: required: false turbo-team: description: 'The team to use for Turbo remote auth' - required: true + required: false turbo-token: description: 'The token to use for Turbo remote auth' - required: true + required: false registry-url: description: 'The registry the packages will be published to' required: false @@ -82,15 +82,17 @@ runs: ) if (ENABLED === 'true') { - if (!TEAM) { - throw new Error('turbo-team input is required and must not be empty') - } - if (!TOKEN) { - throw new Error('turbo-token input is required and must not be empty') + const missing = [] + if (!TEAM) missing.push('turbo-team') + if (!TOKEN) missing.push('turbo-token') + + if (missing.length > 0) { + core.warning(`Missing Turbo remote cache credentials: ${missing.join(', ')}. Turbo remote caching will be disabled.`) + } else { + core.exportVariable('TURBO_CACHE', CACHE) + core.exportVariable('TURBO_TEAM', TEAM) + core.exportVariable('TURBO_TOKEN', TOKEN) } - core.exportVariable('TURBO_CACHE', CACHE) - core.exportVariable('TURBO_TEAM', TEAM) - core.exportVariable('TURBO_TOKEN', TOKEN) } if (SIGNATURE && SIGNATURE !== '') {