From 99877c49329d9ea698dd5c75124c0bb4eb1fbb20 Mon Sep 17 00:00:00 2001 From: Oliver Marshall Date: Tue, 5 Mar 2024 12:28:29 +0000 Subject: [PATCH] ci: deploy cloudformation after build --- .github/workflows/build.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81518f1..f443b4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - build-and-push-ecr: + build-and-push-ecr_and_deploy-cloudformation: runs-on: ubuntu-latest if: github.repository == 'xtdb/xt-fiddle' permissions: @@ -69,3 +69,13 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + - name: Get tag + id: vars + run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT + - name: Deploy to AWS CloudFormation + uses: aws-actions/aws-cloudformation-github-deploy@v1 + with: + name: xt-fiddle + template: cloudformation/deploy.yml + parameter-overrides: "HostedZoneId=${{ secrets.HOSTED_ZONE_ID }},HostedZoneName=${{ secrets.HOSTED_ZONE_NAME }},HostedZoneName=${{ steps.vars.outputs.tag }}"