diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c80172da..d3b9f804 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ env: jobs: - build-test-deploy: + build-test-push: runs-on: ubuntu-latest permissions: id-token: write @@ -104,7 +104,6 @@ jobs: kosli assert artifact cyberdojo/saver:${{ env.IMAGE_TAG }} --artifact-type=docker - # Deploy to aws-beta ------------------ - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1-node16 with: @@ -130,17 +129,24 @@ jobs: --description="Deployed to aws-beta in Github Actions pipeline" --environment=aws-beta -# - name: Deploy to aws-beta -# uses: fivexl/gh-workflow-tf-plan-apply/.github/workflows/base.yml@v0.0.7 -# with: -# aws_region: ${{ env.AWS_REGION }} -# aws_role_arn: arn:aws:iam::${{ env.AWS_ACCOUNT_ID_BETA }}:role/${{ env.GH_ACTIONS_IAM_ROLE_NAME }} -# aws_default_region: ${{ env.AWS_REGION }} -# aws_role_duration: 900 -# working_directory: deployment/terraform/ -# tf_apply: 'true' -# tf_version: v1.4.5 -# tf_additional_env_vars: '{"TF_VAR_TAGGED_IMAGE": "${{ env.ECR_REGISTRY_BETA }}/saver:${{ env.IMAGE_TAG }}"}' + + deploy-to-aws-beta: + needs: [build-test-push] + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + uses: fivexl/gh-workflow-tf-plan-apply/.github/workflows/base.yml@v0.0.7 + with: + aws_region: ${{ env.AWS_REGION }} + aws_role_arn: arn:aws:iam::${{ env.AWS_ACCOUNT_ID_BETA }}:role/${{ env.GH_ACTIONS_IAM_ROLE_NAME }} + aws_default_region: ${{ env.AWS_REGION }} + aws_role_duration: 900 + working_directory: deployment/terraform/ + tf_apply: 'true' + tf_version: v1.4.5 + tf_additional_env_vars: '{"TF_VAR_TAGGED_IMAGE": "${{ env.ECR_REGISTRY_BETA }}/saver:${{ env.IMAGE_TAG }}"}' + # - name: Report expected aws-prod deployment to Kosli # run: