Skip to content

Commit 6c9a137

Browse files
committed
Fix helm vars replace
1 parent ac0a0f5 commit 6c9a137

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/deploy.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,20 @@ jobs:
7777
7878
docker push $ECR_REGISTRY/$AWS_ECR_NAME:migrator
7979
80+
- name: Replace variables in the Helm values file
81+
id: replace-vars
82+
if: ${{ !contains(github.event.head_commit.message , '[skip deploy]') }}
83+
env:
84+
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
85+
IMAGE_TAG: ${{ steps.vars.outputs.sha_short }}
86+
run: |
87+
sed -i 's|${ECR_REGISTRY}|'"$ECR_REGISTRY"'|g' $HELM_FILE
88+
sed -i 's|${IMAGE_TAG}|'"$IMAGE_TAG"'|g' $HELM_FILE
89+
8090
- name: Deploying Service to Kubernetes with Helm
8191
id: deploy
8292
uses: bitovi/github-actions-deploy-eks-helm@v1.2.10
8393
with:
84-
values: image.repository=${{ steps.login-ecr.outputs.registry }}/${{ env.AWS_ECR_NAME }},image.tag=${{ steps.vars.outputs.sha_short }}
8594
cluster-name: ${{ env.CLUSTER_NAME }}
8695
config-files: ${{ env.HELM_FILE }}
8796
chart-path: techops-services/common

deploy/staging/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ httpBasicAuth:
3333

3434
image:
3535
repository: ${ECR_REGISTRY}/keeperhub-staging
36-
tag: latest
36+
tag: ${IMAGE_TAG}
3737
pullPolicy: Always
3838

3939
deployment:

0 commit comments

Comments
 (0)