File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
infrastructure/applications/pycon_frontend Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -274,7 +274,7 @@ jobs:
274274 id : image
275275 run : |
276276 set +e
277- aws ecr describe-images --repository-name=pythonit/pycon-frontend --image-ids=imageTag=${{ steps.git.outputs.githash }}
277+ aws ecr describe-images --repository-name=pythonit/${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }}- pycon-frontend --image-ids=imageTag=${{ steps.git.outputs.githash }}
278278 if [[ $? == 0 ]]; then
279279 echo "image_exists=1" >> $GITHUB_OUTPUT
280280 else
@@ -315,7 +315,7 @@ jobs:
315315 builder : ${{ steps.buildx.outputs.name }}
316316 provenance : false
317317 push : true
318- tags : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com/pythonit/pycon-frontend:${{ steps.git.outputs.githash }}
318+ tags : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com/pythonit/${{ fromJSON('["pastaporto", "production"]')[github.ref == 'refs/heads/main'] }}- pycon-frontend:${{ steps.git.outputs.githash }}
319319 cache-from : type=local,src=/tmp/.buildx-cache
320320 cache-to : type=local,dest=/tmp/.buildx-cache
321321 platforms : linux/arm64
Original file line number Diff line number Diff line change 1- data "aws_ecr_repository" "repo" {
2- name = " pythonit/pycon-frontend"
1+ resource "aws_ecr_repository" "repo" {
2+ name = " pythonit/${ terraform . workspace } - pycon-frontend"
33}
44
55data "aws_ecr_image" "image" {
6- repository_name = data . aws_ecr_repository . repo . name
6+ repository_name = aws_ecr_repository. repo . name
77 image_tag = data. external . githash . result . githash
88}
99
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ resource "aws_ecs_task_definition" "pycon_frontend" {
1010 container_definitions = jsonencode ([
1111 {
1212 name = " frontend"
13- image = " ${ data . aws_ecr_repository . repo . repository_url } @${ data . aws_ecr_image . image . image_digest } "
13+ image = " ${ aws_ecr_repository . repo . repository_url } @${ data . aws_ecr_image . image . image_digest } "
1414 memoryReservation = local.is_prod ? 400 : 10
1515 essential = true
1616
You can’t perform that action at this time.
0 commit comments