From 7d8f07d029796c3fe4c1b0646264d8d62666737f Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Fri, 22 Oct 2021 15:12:26 -0400 Subject: [PATCH] build(ci): Fix boolean comparisons for GHA workflow Booleans and integers will get cast to strings in the meta deploys workflow. See https://github.com/getsentry/sentry/pull/29388 --- .github/workflows/scripts/deploy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/deploy.js b/.github/workflows/scripts/deploy.js index 7ca9384a9ce7da..c7e05972de1938 100644 --- a/.github/workflows/scripts/deploy.js +++ b/.github/workflows/scripts/deploy.js @@ -12,9 +12,10 @@ module.exports = { * determine what Freight deploy we can use. */ updateChangeType: async ({github, context, fileChanges}) => { + // Note that `fileChanges` bools and ints will get cast to strings const {frontend, backend} = fileChanges; - const frontendOnly = frontend && !backend; - const backendOnly = backend && !frontend; + const frontendOnly = frontend === 'true' && backend === 'false'; + const backendOnly = backend === 'true' && frontend === 'false'; const name = frontendOnly ? 'only frontend changes'