From 0dcde57cbd7c6deed60eb2a3a2c0890fc5cc6b22 Mon Sep 17 00:00:00 2001 From: Tommaso Rossi Date: Fri, 17 Jan 2025 14:04:20 +0000 Subject: [PATCH] chore: Automate deploy in prod with approval --- .github/workflows/release.yml | 39 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bb1214..196d4a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,25 +71,24 @@ jobs: app-name: ${{ vars.APP_NAME }} image: ${{ needs.release.outputs.new-release-image }} - # TODO disabled at the moment - # deploy-prod: - # name: Deploy PROD - # runs-on: ubuntu-24.04 - # environment: prod - # needs: [release] - # if: needs.release.outputs.new-release-published == 'true' + deploy-prod: + name: Deploy PROD + runs-on: ubuntu-24.04 + environment: prod + needs: [release, deploy-uat] + if: needs.release.outputs.new-release-published == 'true' - # permissions: - # id-token: write - # contents: read + permissions: + id-token: write + contents: read - # steps: - # - name: Deploy - # uses: pagopa/ict-github-actions/appservice-deploy@v1.4.3 - # with: - # tenant-id: ${{ secrets.ARM_TENANT_ID }} - # subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }} - # client-id: ${{ secrets.ARM_CLIENT_ID }} - # resource-group-name: ${{ vars.RESOURCE_GROUP_NAME }} - # app-name: ${{ vars.APP_NAME }} - # image: ${{ needs.release.outputs.new-release-image }} + steps: + - name: Deploy + uses: pagopa/ict-github-actions/appservice-deploy@7b9f0300421af37c88c729b3849a80fce8820f20 # v1.5.2 + with: + tenant-id: ${{ secrets.ARM_TENANT_ID }} + subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }} + client-id: ${{ secrets.ARM_CLIENT_ID }} + resource-group-name: ${{ vars.RESOURCE_GROUP_NAME }} + app-name: ${{ vars.APP_NAME }} + image: ${{ needs.release.outputs.new-release-image }}