From 524ceb622c97b7e3ee444bcf8eb2eeec5190ff20 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Wed, 3 Aug 2022 11:39:35 -0400 Subject: [PATCH] Changes to clean up deployment creation in workflow jobs. (#2160) Co-authored-by: Todd Martin <> --- .github/workflows/qa-deploy.yml | 12 +++--------- .github/workflows/release.yml | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/qa-deploy.yml b/.github/workflows/qa-deploy.yml index 82826fc14..40d656e52 100644 --- a/.github/workflows/qa-deploy.yml +++ b/.github/workflows/qa-deploy.yml @@ -95,17 +95,11 @@ jobs: id: deployment with: token: '${{ secrets.GITHUB_TOKEN }}' + initial-status: 'in_progress' environment: 'Server ${{ matrix.name }} - QA' task: 'deploy' description: 'Deploy from ${{ env.branch_name }} branch' - - name: Update ${{ matrix.name }} deployment status to In Progress - uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - state: 'in_progress' - deployment-id: ${{ steps.deployment.outputs.deployment_id }} - - name: Download latest ${{ matrix.name }} asset from ${{ env.branch_name }} uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8 env: @@ -155,7 +149,7 @@ jobs: --resource-group $AZURE_RESOURCE_GROUP - name: Update ${{ matrix.name }} deployment status to Success - if: success() + if: ${{ success() }} uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 with: token: '${{ secrets.GITHUB_TOKEN }}' @@ -163,7 +157,7 @@ jobs: deployment-id: ${{ steps.deployment.outputs.deployment_id }} - name: Update ${{ matrix.name }} deployment status to Failure - if: failure() + if: ${{ failure() }} uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 with: token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a64390e43..dcd8c91ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,17 +80,11 @@ jobs: id: deployment with: token: '${{ secrets.GITHUB_TOKEN }}' + initial-status: 'in_progress' environment: 'Server ${{ matrix.name }} - Production' task: 'deploy' description: 'Deploy from ${{ needs.setup.outputs.branch-name }} branch' - - name: Update ${{ matrix.name }} deployment status to In Progress - uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 - with: - token: '${{ secrets.GITHUB_TOKEN }}' - state: 'in_progress' - deployment-id: ${{ steps.deployment.outputs.deployment_id }} - - name: Download latest Release ${{ matrix.name }} asset if: ${{ github.event.inputs.release_type != 'Dry Run' }} uses: bitwarden/gh-actions/download-artifacts@c1fa8e09871a860862d6bbe36184b06d2c7e35a8 @@ -156,7 +150,7 @@ jobs: az webapp start -n $WEBAPP_NAME -g $RESOURCE_GROUP -s staging - name: Update ${{ matrix.name }} deployment status to Success - if: success() + if: ${{ success() }} uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 with: token: '${{ secrets.GITHUB_TOKEN }}' @@ -164,7 +158,7 @@ jobs: deployment-id: ${{ steps.deployment.outputs.deployment_id }} - name: Update ${{ matrix.name }} deployment status to Failure - if: failure() + if: ${{ failure() }} uses: chrnorm/deployment-status@07b3930847f65e71c9c6802ff5a402f6dfb46b86 with: token: '${{ secrets.GITHUB_TOKEN }}'