From 94b2a544a06a0289221a5c3fe2f9f05bd37ae6d6 Mon Sep 17 00:00:00 2001 From: Roy Wong Date: Wed, 7 Feb 2024 08:26:48 -0700 Subject: [PATCH] Restore create-github-deployment --- ...im-reusable-finish-deployment-workflow.yml | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/im-reusable-finish-deployment-workflow.yml b/.github/workflows/im-reusable-finish-deployment-workflow.yml index a6d614ef..d3672ef1 100644 --- a/.github/workflows/im-reusable-finish-deployment-workflow.yml +++ b/.github/workflows/im-reusable-finish-deployment-workflow.yml @@ -156,19 +156,20 @@ jobs: source-slot: ${{ inputs.source-slot }} timezone: ${{ inputs.timezone }} - # Only run this step if Tech Hub metadata.name value is passed in - # - name: Create GitHub Deployment - # if: ${{ inputs.entity != null }} - # uses: im-open/create-github-deployment@v1.0 - # with: - # workflow-actor: ${{ github.actor }} # This will add the user who kicked off the workflow to the deployment payload - # token: ${{ secrets.GITHUB_TOKEN }} # Special per-job token generated by GH for interacting with the repo - # environment: ${{ inputs.deployment-environment }} - # release-ref: ${{ inputs.release-tag }} - # deployment-status: ${{ steps.conclusion.outputs.workflow_conclusion }} - # deployment-description: 'Deployment to the ${{ inputs.deployment-environment }} environment of ${{ inputs.release-tag }}' - # entity: ${{ inputs.entity }} - # instance: ${{ inputs.instance || inputs.target-slot }} + # Only run this step if Tech Hub metadata.name value + # and a metadata.instance value are provided + - name: Create GitHub Deployment + if: ${{ inputs.entity != null && inputs.instance != null }} + uses: im-open/create-github-deployment@v1.0 + with: + workflow-actor: ${{ github.actor }} # This will add the user who kicked off the workflow to the deployment payload + token: ${{ secrets.GITHUB_TOKEN }} # Special per-job token generated by GH for interacting with the repo + environment: ${{ inputs.deployment-environment }} + release-ref: ${{ inputs.release-tag }} + deployment-status: ${{ steps.conclusion.outputs.workflow_conclusion }} + deployment-description: 'Deployment to the ${{ inputs.deployment-environment }} environment of ${{ inputs.release-tag }}' + entity: ${{ inputs.entity }} + instance: ${{ inputs.instance || inputs.target-slot }} - name: Configure facts for team's notification channel if: always()