Skip to content

Commit 210ec87

Browse files
committed
GCP after docker
1 parent 1d780a0 commit 210ec87

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

.github/workflows/docker-image-release.yml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,6 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@v4
2121

22-
- name: Install ECR helper
23-
run: |
24-
sudo apt-get update
25-
sudo apt-get install -y amazon-ecr-credential-helper
26-
27-
- name: Use ECR credential helper
28-
run: |
29-
mkdir -p ~/.docker
30-
echo '{"credHelpers": {"public.ecr.aws": "ecr-login"}}' > ~/.docker/config.json
31-
3222
- name: Configure AWS Credentials for CI
3323
uses: aws-actions/configure-aws-credentials@v4
3424
with:
@@ -43,15 +33,11 @@ jobs:
4333
role-duration-seconds: 1200
4434
role-chaining: true
4535

46-
- name: Configure GCP Credentials for Shared Services
47-
uses: "google-github-actions/auth@v2"
36+
- name: Login to Amazon ECR Public
37+
id: login-ecr-public
38+
uses: aws-actions/amazon-ecr-login@v2
4839
with:
49-
project_id: ${{ env.GCP_PROJECT}}
50-
workload_identity_provider: "projects/806289336876/locations/global/workloadIdentityPools/github-actions/providers/github-actions-provider"
51-
52-
- name: Authenticate to GCR
53-
run: |
54-
gcloud auth --project=${GCP_PROJECT} configure-docker ${GCP_REGION}-docker.pkg.dev --quiet
40+
registry-type: public
5541

5642
- name: Set up QEMU
5743
uses: docker/setup-qemu-action@v3
@@ -65,6 +51,16 @@ jobs:
6551
username: ${{ secrets.DOCKERHUB_USERNAME }}
6652
password: ${{ secrets.DOCKERHUB_TOKEN }}
6753

54+
- name: Configure GCP Credentials for Shared Services
55+
uses: "google-github-actions/auth@v2"
56+
with:
57+
project_id: ${{ env.GCP_PROJECT}}
58+
workload_identity_provider: "projects/806289336876/locations/global/workloadIdentityPools/github-actions/providers/github-actions-provider"
59+
60+
- name: Authenticate to GCR
61+
run: |
62+
gcloud auth --project=${GCP_PROJECT} configure-docker ${GCP_REGION}-docker.pkg.dev --quiet
63+
6864
- name: Build and push multi-arch Docker image
6965
uses: docker/build-push-action@v6
7066
with:

0 commit comments

Comments
 (0)