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

Commit

Permalink
add reusable variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LindseySaari committed Feb 21, 2022
1 parent 9904d9d commit 4128d0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/deploy-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
auto_deploy_envs:
required: true # utility
type: string
app_name:
required: true # platform-console-api
type: string
secrets:
aws_access_key_id: #${{ secrets.AWS_ACCESS_KEY_ID }}
required: true
Expand Down Expand Up @@ -87,8 +90,8 @@ jobs:
envs=( ${{ needs.prepare-values.outputs.environments }} )
for env in ${envs[*]};
do
yq e -i '(.spec.template.spec.containers[] | select(.name == "platform-console-api").image) |= "008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/${{inputs.ecr_repository}}:${{inputs.ecr_repository}}-${{ github.sha }}"' $env/deployment.yml
yq e -i '(.spec.template.spec.initContainers[] | select(.name == "platform-console-api").image) |= "008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/${{inputs.ecr_repository}}:${{inputs.ecr_repository}}-${{ github.sha }}"' $env/deployment.yml
yq e -i '(.spec.template.spec.containers[] | select(.name == ${{inputs.app_name}}).image) |= "008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/${{inputs.ecr_repository}}:${{inputs.ecr_repository}}-${{ github.sha }}"' $env/deployment.yml
yq e -i '(.spec.template.spec.initContainers[] | select(.name == ${{inputs.app_name}}).image) |= "008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/dsva/${{inputs.ecr_repository}}:${{inputs.ecr_repository}}-${{ github.sha }}"' $env/deployment.yml
done
- name: Add and Commit file
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
ecr_repository: 'platform-console'
manifests_directory: 'vsp-tools-backend/platform-console-api'
auto_deploy_envs: 'utility'
app_name: 'platform-console-api'
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 comments on commit 4128d0c

Please sign in to comment.