Skip to content

Commit 0695914

Browse files
committed
change
1 parent f977798 commit 0695914

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/build-frontend.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
githash:
55
required: true
66
type: string
7+
tf_environment:
8+
required: true
9+
type: string
710

811
jobs:
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
@@ -47,7 +50,7 @@ jobs:
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

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)