Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DEVOPS-332] Ignore backticks in pull request descriptions in ephemeral deployments workflow #94

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/ephemeral-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)
Expand All @@ -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
Expand Down
Loading