Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
use env var
Browse files Browse the repository at this point in the history
  • Loading branch information
LindseySaari committed Feb 15, 2022
1 parent 4c0abf4 commit 17177eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
required: true
aws_secret_access_key: #${{ secrets.AWS_SECRET_ACCESS_KEY }}
required: true
env:
IMAGE_NAME: "008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/${{inputs.ecr_repository}}:${{inputs.ecr_repository}}-${{ github.sha }}"

jobs:
prepare-values:
Expand Down Expand Up @@ -84,11 +86,10 @@ jobs:
ECR_REPOSITORY: dsva/${{inputs.ecr_repository}}
run: |
cd vsp-infra-application-manifests/apps/${{inputs.manifests_directory}}
image_name = "008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/${{inputs.ecr_repository}}:${{inputs.ecr_repository}}-${{ github.sha }}"
envs=( ${{ needs.prepare-values.outputs.environments }} )
for env in ${envs[*]}; do
yq e -i '.spec.template.spec.containers.[0].image = ${image_name}' $env/deployment.yml
yq e -i '.spec.template.spec.initContainers.[0].image = ${image_name}' $env/deployment.yml
yq e -i '.spec.template.spec.containers.[0].image = ${IMAGE_NAME}' $env/deployment.yml
yq e -i '.spec.template.spec.initContainers.[0].image = ${IMAGE_NAME}' $env/deployment.yml
done
- name: Add and Commit file
Expand Down

0 comments on commit 17177eb

Please sign in to comment.