mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
addres JTK PR: split optional ecr uri and image digest logic in deploy lambda
This commit is contained in:
parent
9c4a8e11db
commit
201888bc3a
1 changed files with 9 additions and 3 deletions
12
.github/workflows/_deploy_lambda.yml
vendored
12
.github/workflows/_deploy_lambda.yml
vendored
|
|
@ -121,15 +121,21 @@ jobs:
|
|||
TF_VAR_google_solar_api_key: ${{ secrets.TF_VAR_google_solar_api_key }}
|
||||
TF_VAR_ordnance_survey_api_key: ${{ secrets.TF_VAR_ordnance_survey_api_key}}
|
||||
run: |
|
||||
EXTRA_VARS=""
|
||||
ECR_REPO_URL_VAR=""
|
||||
if [[ -n "${{ inputs.ecr_repo }}" ]]; then
|
||||
EXTRA_VARS="-var=ecr_repo_url=${{ steps.repo.outputs.ecr_repo_url }} -var=image_digest=${{ inputs.image_digest }}"
|
||||
ECR_REPO_URL_VAR="-var=ecr_repo_url=${{ steps.repo.outputs.ecr_repo_url }}"
|
||||
fi
|
||||
|
||||
IMAGE_DIGEST_VAR=""
|
||||
if [[ -n "${{ inputs.ecr_repo }}" ]]; then
|
||||
IMAGE_DIGEST_VAR="-var=image_digest=${{ inputs.image_digest }}"
|
||||
fi
|
||||
|
||||
terraform plan \
|
||||
-var="stage=${{ inputs.stage }}" \
|
||||
-var="lambda_name=${{ inputs.lambda_name }}" \
|
||||
$EXTRA_VARS \
|
||||
$ECR_REPO_URL_VAR \
|
||||
$IMAGE_DIGEST_VAR \
|
||||
-out=lambdaplan
|
||||
|
||||
- name: Terraform Apply
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue