From 5915a82134c8d4e86fb1705d7bb60ef7f616f36f Mon Sep 17 00:00:00 2001 From: ebronson68 <111298136+ebronson68@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:16:24 -0600 Subject: [PATCH 1/2] add single quotes around description --- .github/workflows/ephemeral-deploy.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ephemeral-deploy.yaml b/.github/workflows/ephemeral-deploy.yaml index af0c7331..d2f5ed8f 100644 --- a/.github/workflows/ephemeral-deploy.yaml +++ b/.github/workflows/ephemeral-deploy.yaml @@ -52,10 +52,6 @@ on: JIRA_TOKEN: required: true -env: - githubPrBranch: ${{ github.head_ref }} - githubPrTitle: ${{ github.event.pull_request.title }} - githubPrDescription: ${{ github.event.pull_request.body }} jobs: prepare: @@ -65,6 +61,10 @@ jobs: steps: - name: Retrieve Jira ticket ID id: jira-ticket + env: + githubPrBranch: ${{ github.head_ref }} + githubPrTitle: ${{ github.event.pull_request.title }} + githubPrDescription: ${{ github.event.pull_request.body }} run: | PR_BRANCH=$(echo "${{ env.githubPrBranch }}" | grep -Eo "\b[A-Z][A-Z0-9_]+-[1-9][0-9]*" || true) PR_TITLE=$(echo "${{ env.githubPrTitle }}" | grep -Eo "\b[A-Z][A-Z0-9_]+-[1-9][0-9]*" || true) @@ -91,7 +91,7 @@ jobs: id: environment shell: bash run: | - DESCRIPTION="${{ env.githubPrDescription }}" + DESCRIPTION="$(echo '${{ env.githubPrDescription }}') | tr -d '`$)(')" ENVIRONMENT=$(echo "${DESCRIPTION}" | grep -Eo "\- \[x\] .+ Key Vaults" | awk -F ' ' '{print $3}' | tr '[:upper:]' '[:lower:]') if [ -n "${ENVIRONMENT}" ]; then echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT From fcf3c52c4b83988a72ca4c555d6ec712a72dd94d Mon Sep 17 00:00:00 2001 From: ebronson68 <111298136+ebronson68@users.noreply.github.com> Date: Mon, 4 Dec 2023 12:17:53 -0600 Subject: [PATCH 2/2] Remove extra parentheses --- .github/workflows/ephemeral-deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ephemeral-deploy.yaml b/.github/workflows/ephemeral-deploy.yaml index d2f5ed8f..44014597 100644 --- a/.github/workflows/ephemeral-deploy.yaml +++ b/.github/workflows/ephemeral-deploy.yaml @@ -91,7 +91,7 @@ jobs: id: environment shell: bash run: | - DESCRIPTION="$(echo '${{ env.githubPrDescription }}') | tr -d '`$)(')" + DESCRIPTION="$(echo '${{ env.githubPrDescription }}' | tr -d '`$)(')" ENVIRONMENT=$(echo "${DESCRIPTION}" | grep -Eo "\- \[x\] .+ Key Vaults" | awk -F ' ' '{print $3}' | tr '[:upper:]' '[:lower:]') if [ -n "${ENVIRONMENT}" ]; then echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT