Skip to content

Commit 9024ed5

Browse files
committed
Uses environment variable to get the ECR Registry
1 parent debea38 commit 9024ed5

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

.github/workflows/deploy-dev.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,11 @@ jobs:
4747
kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE}
4848
kubectl config use-context ${KUBE_CLUSTER}
4949
50-
- name: Assume role in Cloud Platform
51-
uses: aws-actions/configure-aws-credentials@v4
52-
with:
53-
role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }}
54-
aws-region: ${{ inputs.ECR_REGION }}
55-
56-
- name: Login to container registry
57-
id: login-ecr
58-
uses: aws-actions/amazon-ecr-login@v2
59-
6050
- name: Upgrade the Helm chart
6151
env:
6252
IMAGE_TAG: ${{ github.sha }}
53+
REGISTRY: ${{ secrets.ECR_REGISTRY }}
6354
REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
64-
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
6555
HELM_DIR: "helm_deploy/laa-access-civil-legal-aid"
6656
DEV_HOST: "access-cla.cloud-platform.service.justice.gov.uk"
6757
# head_ref is set if the workflow was triggered by a PR, ref_name is used if the workflow was trigged by a push.

.github/workflows/deploy.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,11 @@ jobs:
4747
kubectl config set-context ${KUBE_CLUSTER} --cluster=${KUBE_CLUSTER} --user=deploy-user --namespace=${KUBE_NAMESPACE}
4848
kubectl config use-context ${KUBE_CLUSTER}
4949
50-
- name: Assume role in Cloud Platform
51-
uses: aws-actions/configure-aws-credentials@v4
52-
with:
53-
role-to-assume: ${{ secrets.ECR_ROLE_TO_ASSUME }}
54-
aws-region: ${{ inputs.ECR_REGION }}
55-
56-
- name: Login to container registry
57-
id: login-ecr
58-
uses: aws-actions/amazon-ecr-login@v2
59-
6050
- name: Upgrade the Helm chart
6151
env:
6252
IMAGE_TAG: ${{ github.sha }}
53+
REGISTRY: ${{ secrets.ECR_REGISTRY }}
6354
REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
64-
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
6555
HELM_DIR: "helm_deploy/laa-access-civil-legal-aid"
6656
run: |
6757
helm upgrade laa-access-civil-legal-aid \

0 commit comments

Comments
 (0)