Skip to content

Commit

Permalink
Log into ECR during deploy step
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMillar-MOJ committed May 16, 2024
1 parent dad9f07 commit f2c827f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,24 @@ jobs:
kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE}
kubectl config use-context ${KUBE_CLUSTER}
- name: Assume role in Cloud Platform
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }}
aws-region: ${{ inputs.ECR_REGION }}

- name: Login to container registry
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Upgrade the Helm chart
env:
IMAGE_TAG: ${{ github.sha }}
REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
HELM_DIR: "helm_deploy/laa-access-civil-legal-aid"
run: |
echo ${REGISTRY}
helm upgrade laa-access-civil-legal-aid \
${HELM_DIR} \
--namespace=${{ secrets.KUBE_NAMESPACE }} \
Expand Down

0 comments on commit f2c827f

Please sign in to comment.