File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 44 githash :
55 required : true
66 type : string
7+ tf_environment :
8+ required : true
9+ type : string
710
811jobs :
912 build :
@@ -30,13 +33,13 @@ jobs:
3033 - name : Get vars
3134 id : vars
3235 run : |
33- cms_hostname=$(aws ssm get-parameter --output text --query Parameter.Value --with-decryption --name /pythonit/${{ env.TF_WORKSPACE }}/pycon-frontend/cms-hostname)
36+ cms_hostname=$(aws ssm get-parameter --output text --query Parameter.Value --with-decryption --name /pythonit/${{ inputs.tf_environment }}/pycon-frontend/cms-hostname)
3437 echo "CMS_HOSTNAME=$cms_hostname" >> "$GITHUB_OUTPUT"
3538
36- conference_code=$(aws ssm get-parameter --output text --query Parameter.Value --with-decryption --name /pythonit/${{ env.TF_WORKSPACE }}/pycon-frontend/conference-code)
39+ conference_code=$(aws ssm get-parameter --output text --query Parameter.Value --with-decryption --name /pythonit/${{ inputs.tf_environment }}/pycon-frontend/conference-code)
3740 echo "CONFERENCE_CODE=$conference_code" >> "$GITHUB_OUTPUT"
3841
39- sentry_auth_token=$(aws ssm get-parameter --output text --query Parameter.Value --with-decryption --name /pythonit/${{ env.TF_WORKSPACE }}/common/sentry-auth-token)
42+ sentry_auth_token=$(aws ssm get-parameter --output text --query Parameter.Value --with-decryption --name /pythonit/${{ inputs.tf_environment }}/common/sentry-auth-token)
4043 echo "::add-mask::$sentry_auth_token"
4144 echo "SENTRY_AUTH_TOKEN=$sentry_auth_token" >> "$GITHUB_OUTPUT"
4245 - name : Build and push
4750 builder : ${{ steps.buildx.outputs.name }}
4851 provenance : false
4952 push : true
50- tags : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com/pythonit/${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }}-pycon-frontend:${{ inputs.githash }}
53+ tags : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com/pythonit/${{ inputs.tf_environment }}-pycon-frontend:${{ inputs.githash }}
5154 cache-from : type=local,src=/tmp/.buildx-cache
5255 cache-to : type=local,dest=/tmp/.buildx-cache
5356 platforms : linux/arm64
Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ jobs:
186186 uses : ./.github/workflows/build-frontend.yml
187187 with :
188188 githash : ${{ needs.check-frontend-build.outputs.githash }}
189+ tf_environment : ${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }}
189190 secrets : inherit
190191 if : always() && needs.check-frontend-build.outputs.image_exists == 0 && !cancelled() && !failure() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
191192
You can’t perform that action at this time.
0 commit comments