Skip to content

Commit

Permalink
CI: deploy to aws-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
JonJagger committed Oct 21, 2023
1 parent 83e0481 commit e1d8e3c
Showing 1 changed file with 21 additions and 27 deletions.
48 changes: 21 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
--name=snyk-scan
--scan-results=snyk.json

# Deploy to aws-beta ------------------
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
Expand All @@ -111,36 +112,32 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1

- name: Push image to private ECRs
- name: Push image to private ECR for beta
run: |
docker tag cyberdojo/saver:${{ env.IMAGE_TAG }} ${{ env.ECR_REGISTRY_BETA }}/saver:${{ env.IMAGE_TAG }}
docker tag cyberdojo/saver:${{ env.IMAGE_TAG }} ${{ env.ECR_REGISTRY_PROD }}/saver:${{ env.IMAGE_TAG }}
docker push ${{ env.ECR_REGISTRY_BETA }}/saver:${{ env.IMAGE_TAG }}
docker push ${{ env.ECR_REGISTRY_PROD }}/saver:${{ env.IMAGE_TAG }}
docker logout
# - name: Report expected aws-beta deployment to Kosli
# run:
# kosli expect deployment cyberdojo/saver:${{ env.IMAGE_TAG }}
# --artifact-type=docker
# --description="Deployed to aws-beta in Github Actions pipeline"
# --environment=aws-beta

# - name: Deploy to aws-beta
# permissions:
# id-token: write
# contents: write
# uses: fivexl/gh-workflow-tf-plan-apply/.github/workflows/[email protected]
# 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-beta deployment to Kosli
run:
kosli expect deployment cyberdojo/saver:${{ env.IMAGE_TAG }}
--artifact-type=docker
--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/[email protected]
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 ------------------
# - name: Report expected aws-prod deployment to Kosli
# run:
# kosli expect deployment cyberdojo/saver:${{ env.IMAGE_TAG }}
Expand All @@ -149,9 +146,6 @@ jobs:
# --environment=aws-prod

# - name: Deploy to aws-prod
# permissions:
# id-token: write
# contents: write
# uses: fivexl/gh-workflow-tf-plan-apply/.github/workflows/[email protected]
# with:
# aws_region: ${{ env.AWS_REGION }}
Expand Down

0 comments on commit e1d8e3c

Please sign in to comment.