From c8cb1de41ac9e77e68ce95d7f8df53486ec62854 Mon Sep 17 00:00:00 2001 From: Ella Bronson <111298136+ebronson68@users.noreply.github.com> Date: Wed, 13 Dec 2023 15:33:31 -0600 Subject: [PATCH] [DEVOPS-339] Fix if conditions in ephemeral deployment workflow (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit
DEVOPS-339
Summary Ephemeral deployment workflow not deleting deployment or B2C redirect URIs after PR closes
Type Story Story
Status To Do
Points N/A
Labels -
--- ## Description - Fix if conditions in ephemeral deployment workflow - Moved if condition from the `prepare` job to the `deploy` job. - Fixed workflow triggers on a PR's 'synchronize', 'reopened', and 'opened' events by checking for all iterations of the `preview:` label. ## Related Links - Jira Issue: DEVOPS-339 - Testing environment: [![📦️ Deploy Ephemeral Environment](https://github.com/Andrews-McMeel-Universal/reusable_workflows-test/actions/workflows/ephemeral-deployments.yml/badge.svg?branch=story%2FDEVOPS-XXX%2Ftest-ephemeral-deployments)](https://github.com/Andrews-McMeel-Universal/reusable_workflows-test/actions/workflows/ephemeral-deployments.yml) --- .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 8e1b5f31..11927837 100644 --- a/.github/workflows/ephemeral-deploy.yaml +++ b/.github/workflows/ephemeral-deploy.yaml @@ -60,7 +60,6 @@ env: jobs: prepare: name: Preparation Step - if: ${{ github.event.action == 'labeled' && startsWith(github.event.label.name, 'preview:') || github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'preview:') }} runs-on: ubuntu-latest steps: - name: Get Jira ticket ID @@ -119,6 +118,7 @@ jobs: deploy: name: Deploy Azure Container Instance + if: github.event_name == 'pull_request' && ((github.event.action == 'labeled' && startsWith(github.event.label.name, 'preview:')) || (contains(github.event.pull_request.labels.*.name, 'preview:development') || contains(github.event.pull_request.labels.*.name, 'preview:staging') || contains(github.event.pull_request.labels.*.name, 'preview:production'))) needs: [prepare] runs-on: ubuntu-latest environment: