From 645c97dbb98e51c309a9f6be2e6aa05b5d38a269 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Tue, 17 Sep 2024 09:57:09 -0400 Subject: [PATCH] Update deploy-preview.yml ensure PRODUCTS_INCLUDE steps concatenate as expected Signed-off-by: Steven Serrata <9343811+sserrata@users.noreply.github.com> --- .github/workflows/deploy-preview.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 1dc00f935..4d77bd47e 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -131,36 +131,46 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'netsec') run: | echo "Including 'netsec' in build..." - echo "PRODUCTS_INCLUDE=cdss,threat-vault,dns-security,iot,expedition,cloudngfw,cdl,panos,terraform,ansible,splunk,aiops-ngfw-bpa,email-dlp,dlp" >> $GITHUB_ENV - + if [[ -n "$PRODUCTS_INCLUDE" ]]; then + echo "PRODUCTS_INCLUDE=$PRODUCTS_INCLUDE,cdss,threat-vault,dns-security,iot,expedition,cloudngfw,cdl,panos,terraform,ansible" >> $GITHUB_ENV + else + echo "PRODUCTS_INCLUDE=cdss,threat-vault,dns-security,iot,expedition,cloudngfw,cdl,panos,terraform,ansible" >> $GITHUB_ENV + fi + - name: Include cloud if: contains(github.event.pull_request.labels.*.name, 'cloud') run: | echo "Including 'cloud' in build..." - echo "PRODUCTS_INCLUDE=prisma-cloud,compute" >> $GITHUB_ENV - + if [[ -n "$PRODUCTS_INCLUDE" ]]; then + echo "PRODUCTS_INCLUDE=$PRODUCTS_INCLUDE,prisma-cloud,compute" >> $GITHUB_ENV + else + echo "PRODUCTS_INCLUDE=prisma-cloud,compute" >> $GITHUB_ENV + fi + - name: Include sase if: contains(github.event.pull_request.labels.*.name, 'sase') run: | echo "Including 'sase' in build..." - if [ $PRODUCTS_INCLUDE != '' ] - then + if [[ -n "$PRODUCTS_INCLUDE" ]]; then echo "PRODUCTS_INCLUDE=$PRODUCTS_INCLUDE,sase,access,sdwan" >> $GITHUB_ENV else echo "PRODUCTS_INCLUDE=sase,access,sdwan" >> $GITHUB_ENV fi - + - name: Include contributing if: contains(github.event.pull_request.labels.*.name, 'contributing') run: | echo "Including 'contributing' in build..." - if [ $PRODUCTS_INCLUDE != '' ] - then + if [[ -n "$PRODUCTS_INCLUDE" ]]; then echo "PRODUCTS_INCLUDE=$PRODUCTS_INCLUDE,contributing" >> $GITHUB_ENV else echo "PRODUCTS_INCLUDE=contributing" >> $GITHUB_ENV fi + - name: Output final PRODUCTS_INCLUDE + run: | + echo "Building the following products: $PRODUCTS_INCLUDE" + - name: Build site run: yarn build-github && zip -r build.zip build