diff --git a/.github/workflows/job-deploy.yml b/.github/workflows/job-deploy.yml index a38266b2..f9cd652a 100644 --- a/.github/workflows/job-deploy.yml +++ b/.github/workflows/job-deploy.yml @@ -202,6 +202,9 @@ jobs: if [[ "$ENABLE_SCALABILITY_VALUE" != "true" && "$ENABLE_SCALABILITY_VALUE" != "false" ]]; then echo "❌ ERROR: enable_scalability must be 'true' or 'false', got: '$ENABLE_SCALABILITY_VALUE'" VALIDATION_FAILED=true + elif [[ "$ENABLE_SCALABILITY_VALUE" == "true" && "$INPUT_WAF_ENABLED" != "true" ]]; then + echo "❌ ERROR: enable_scalability can only be enabled when waf_enabled is 'true'" + VALIDATION_FAILED=true else echo "✅ enable_scalability: '$ENABLE_SCALABILITY_VALUE' is valid" fi diff --git a/.github/workflows/job-send-notification.yml b/.github/workflows/job-send-notification.yml index a9b5eeca..782ac687 100644 --- a/.github/workflows/job-send-notification.yml +++ b/.github/workflows/job-send-notification.yml @@ -1,4 +1,4 @@ -name: Send Notification Job +name: Send Notification Job on: workflow_call: @@ -105,6 +105,9 @@ jobs: CLEANUP_PILL: ${{ steps.cleanup.outputs.CLEANUP_PILL }} CONFIG_LABEL: ${{ steps.config.outputs.CONFIG_LABEL }} run: | + html_escape() { + printf '%s' "$1" | sed -e 's/&/\&/g' -e 's//\>/g' -e 's/"/\"/g' -e "s/'/\'/g" + } RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" PILL_BASE="display:inline-block; min-width:70px; text-align:center; padding:4px 12px; border-radius:20px; font-size:12px; font-weight:600; line-height:1.4;" DEPLOY_PILL="❌ FAILED" @@ -178,8 +181,13 @@ jobs: CONFIG_LABEL: ${{ steps.config.outputs.CONFIG_LABEL }} CLEANUP_PILL: ${{ steps.cleanup.outputs.CLEANUP_PILL }} run: | + html_escape() { + printf '%s' "$1" | sed -e 's/&/\&/g' -e 's//\>/g' -e 's/"/\"/g' -e "s/'/\'/g" + } RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" - RESOURCE_GROUP="$INPUT_RESOURCE_GROUP_NAME" + RESOURCE_GROUP="$(html_escape "$INPUT_RESOURCE_GROUP_NAME")" + ACTOR="$(html_escape "${{ github.actor }}")" + BRANCH="$(html_escape "${{ env.BRANCH_NAME }}")" PILL_BASE="display:inline-block; min-width:70px; text-align:center; padding:4px 12px; border-radius:20px; font-size:12px; font-weight:600; line-height:1.4;" DEPLOY_PILL="❌ FAILED" @@ -213,9 +221,9 @@ jobs: Resource Group ${RESOURCE_GROUP} Triggered By - ${{ github.actor }} + ${ACTOR} Branch - ${{ env.BRANCH_NAME }} + ${BRANCH} - + - +
INVESTIGATE FAILURE @@ -263,6 +271,8 @@ jobs: RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" WEBAPP_URL="$(html_escape "${INPUT_WEB_APPURL:-$INPUT_EXISTING_WEBAPP_URL}")" RESOURCE_GROUP="$(html_escape "$INPUT_RESOURCE_GROUP_NAME")" + ACTOR="$(html_escape "${{ github.actor }}")" + BRANCH="$(html_escape "${{ env.BRANCH_NAME }}")" PILL_BASE="display:inline-block; min-width:70px; text-align:center; padding:4px 12px; border-radius:20px; font-size:12px; font-weight:600; line-height:1.4;" DEPLOY_PILL="✅ SUCCESS" @@ -295,9 +305,9 @@ jobs:
Web App URL ${WEBAPP_URL}
Triggered By${{ github.actor }}
${ACTOR}
Branch${{ env.BRANCH_NAME }}
${BRANCH}
VIEW PIPELINE RUN