File tree Expand file tree Collapse file tree 6 files changed +13
-20
lines changed
infrastructure/applications Expand file tree Collapse file tree 6 files changed +13
-20
lines changed Original file line number Diff line number Diff line change 1717 with :
1818 ref : ${{ github.ref }}
1919 fetch-depth : 0
20- - name : Configure AWS credentials
21- uses : aws-actions/configure-aws-credentials@v4
22- with :
23- aws-access-key-id : ${{ secrets.aws_access_key_id }}
24- aws-secret-access-key : ${{ secrets.aws_secret_access_key }}
25- aws-region : eu-central-1
2620 - name : Set up QEMU dependency
2721 uses : docker/setup-qemu-action@v3
2822 - name : Log in to the Container registry
Original file line number Diff line number Diff line change @@ -14,14 +14,12 @@ jobs:
1414 with :
1515 ref : ${{ github.ref }}
1616 fetch-depth : 0
17- - name : Configure AWS credentials
18- uses : aws-actions/configure-aws-credentials@v4
17+ - name : Log in to the Container registry
18+ uses : docker/login-action@v3
1919 with :
20- aws-access-key-id : ${{ secrets.aws_access_key_id }}
21- aws-secret-access-key : ${{ secrets.aws_secret_access_key }}
22- aws-region : eu-central-1
23- - name : Login to Amazon ECR
24- uses : aws-actions/amazon-ecr-login@v2
20+ registry : ghcr.io
21+ username : ${{ github.actor }}
22+ password : ${{ secrets.GITHUB_TOKEN }}
2523 - name : Set up Docker Buildx
2624 id : buildx
2725 uses : docker/setup-buildx-action@v3
3331 builder : ${{ steps.buildx.outputs.name }}
3432 provenance : false
3533 push : true
36- tags : ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com/pythonit/ pretix:arm- ${{ inputs.githash }}
34+ tags : ghcr.io/pythonitalia/pycon/ pretix:${{ inputs.githash }}
3735 cache-from : type=local,src=/tmp/.buildx-cache
3836 cache-to : type=local,dest=/tmp/.buildx-cache
3937 platforms : linux/arm64
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ resource "aws_ecs_task_definition" "pretix" {
88 container_definitions = jsonencode ([
99 {
1010 name = " pretix"
11- image = " ${ data . aws_ecr_repository . repo . repository_url } @ ${ data . aws_ecr_image . image . image_digest } "
11+ image = " ghcr.io/pythonitalia/pycon/pretix: ${ data . external . githash . result . githash } "
1212 memoryReservation = local.is_prod ? 1500 : 10
1313 essential = true
1414
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ resource "aws_ecs_task_definition" "web" {
44 container_definitions = jsonencode ([
55 {
66 name = " web"
7- image = " ${ data . aws_ecr_repository . be_repo . repository_url } @ ${ data . aws_ecr_image . be_arm_image . image_digest } "
7+ image = local.image
88 memoryReservation = local.is_prod ? 400 : 10
99 essential = true
1010 entrypoint = [
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ locals {
190190 value = module.common_secrets.value.sns_webhook_secret
191191 }
192192 ]
193+ image = " ghcr.io/pythonitalia/pycon/backend:${ data . external . githash . result . githash } "
193194}
194195
195196resource "aws_iam_role" "ecs_service" {
@@ -215,7 +216,7 @@ resource "aws_ecs_task_definition" "worker" {
215216 container_definitions = jsonencode ([
216217 {
217218 name = " worker"
218- image = " ${ data . aws_ecr_repository . be_repo . repository_url } @ ${ data . aws_ecr_image . be_arm_image . image_digest } "
219+ image = local.image
219220 memoryReservation = local.is_prod ? 200 : 10
220221 essential = true
221222 entrypoint = [
@@ -259,7 +260,7 @@ resource "aws_ecs_task_definition" "worker" {
259260 },
260261 {
261262 name = " migrations"
262- image = " ${ data . aws_ecr_repository . be_repo . repository_url } @ ${ data . aws_ecr_image . be_arm_image . image_digest } "
263+ image = local.image
263264 memoryReservation = local.is_prod ? 200 : 10
264265 essential = false
265266 entrypoint = [
@@ -313,7 +314,7 @@ resource "aws_ecs_task_definition" "beat" {
313314 container_definitions = jsonencode ([
314315 {
315316 name = " beat"
316- image = " ${ data . aws_ecr_repository . be_repo . repository_url } @ ${ data . aws_ecr_image . be_arm_image . image_digest } "
317+ image = local.image
317318 memoryReservation = local.is_prod ? 200 : 10
318319 essential = true
319320 entrypoint = [
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 = " ${ aws_ecr_repository . repo . repository_url } @ ${ data . aws_ecr_image . image . image_digest } "
13+ image = " ghcr.io/pythonitalia/pycon/frontend: ${ data . external . githash . result . githash } "
1414 memoryReservation = local.is_prod ? 400 : 10
1515 essential = true
1616
You can’t perform that action at this time.
0 commit comments