Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 3a9901f

Browse files
authored
Migrate to GCP Artifact Registry (#80)
Migrates our image storage from AWS ECR to GCP Artifact Registry to improve compatibility with fly.io. In the past, we've encountered some odd behavior with AWS ECR that doesn't appear to occur with other registries.
1 parent 00d3f3e commit 3a9901f

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,19 @@ jobs:
2626
restore-keys: |
2727
${{ runner.os }}-docker-buildx-${{ matrix.app }}-${{ hashFiles('**/poetry.lock') }}-
2828
29-
- uses: aws-actions/configure-aws-credentials@v2
29+
- uses: google-github-actions/auth@v1
30+
id: gcp
3031
with:
31-
role-to-assume: ${{ secrets.AWS_ROLE }}
32-
role-session-name: ${{ github.run_id }}
33-
aws-region: us-east-1
32+
token_format: access_token
33+
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
34+
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
35+
access_token_lifetime: 150s
3436

35-
- uses: aws-actions/amazon-ecr-login@v1
36-
id: login-ecr
37+
- uses: docker/login-action@v2
3738
with:
38-
registry-type: public
39+
registry: us-central1-docker.pkg.dev
40+
username: oauth2accesstoken
41+
password: ${{ steps.gcp.outputs.access_token }}
3942

4043
- name: Get short Git SHA
4144
id: short-sha
@@ -46,7 +49,7 @@ jobs:
4649
- uses: docker/metadata-action@v4
4750
id: meta
4851
with:
49-
images: ${{ steps.login-ecr.outputs.registry }}/wafflehacks/application-portal-${{ matrix.app }}
52+
images: us-central1-docker.pkg.dev/wafflehacks-production/application-portal/${{ matrix.app }}
5053
tags: |
5154
type=ref,event=branch
5255
type=ref,event=pr

api/fly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ app = "application-portal-api"
77
primary_region = "yyz"
88

99
[build]
10-
image = "public.ecr.aws/wafflehacks/application-portal-api:sha-SHORT_SHA"
10+
image = "us-central1-docker.pkg.dev/wafflehacks-production/application-portal/api:sha-SHORT_SHA"
1111

1212
[deploy]
1313
release_command = "migrate"

tasks/fly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ app = "application-portal-tasks"
77
primary_region = "yyz"
88

99
[build]
10-
image = "public.ecr.aws/wafflehacks/application-portal-tasks:sha-SHORT_SHA"
10+
image = "us-central1-docker.pkg.dev/wafflehacks-production/application-portal/tasks:sha-SHORT_SHA"
1111

1212
[deploy]
1313
strategy = "rolling"

0 commit comments

Comments
 (0)