From f900d6933c11d3dd31b45ecaabfbe192694f1e51 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Wed, 23 Oct 2024 00:42:04 +0300 Subject: [PATCH] ci: simplify PR number check logic using fromJSON in AUTO_DEPLOY_PRS in preview.yml --- .github/workflows/preview.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index c5bb47dcd..ebbdefeba 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -19,12 +19,7 @@ jobs: ) ) || ( - github.event_name == 'pull_request' && ( - contains(vars.AUTO_DEPLOY_PRS, $'\n' + toString(github.event.pull_request.number)) + $'\n' || - startsWith(vars.AUTO_DEPLOY_PRS, toString(github.event.pull_request.number) + $'\n') || - endsWith(vars.AUTO_DEPLOY_PRS, $'\n' + toString(github.event.pull_request.number)) || - vars.AUTO_DEPLOY_PRS == toString(github.event.pull_request.number) - ) + github.event_name == 'pull_request' && fromJSON(env.AUTO_DEPLOY_PRS).includes(github.event.pull_request.number) ) permissions: pull-requests: write