Skip to content

Commit 9638840

Browse files
committed
Use different repo per env for pycon fe
1 parent 4327192 commit 9638840

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

infrastructure/applications/pycon_frontend/repo.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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

55
data "aws_ecr_image" "image" {

0 commit comments

Comments
 (0)