Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deploy image in internal GCP registry #45

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ jobs:
platform:
- linux/amd64
permissions:
contents: read
id-token: write
contents: write
packages: write

steps:
Expand All @@ -40,6 +41,22 @@ jobs:
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3

- name: "Authenticate to Google Cloud"
id: google-auth
uses: "google-github-actions/auth@v1"
with:
token_format: "access_token"
workload_identity_provider: "${{ secrets.GCP_PRD_GITHUB_WIF }}"
service_account: "${{ secrets.GCP_PRD_GITHUB_SA_DOCKER_REGISTRY }}"
create_credentials_file: true

- name: Login to the registry - production
uses: docker/login-action@v2
with:
registry: asia-docker.pkg.dev
username: oauth2accesstoken
password: "${{ steps.google-auth.outputs.access_token }}"

- name: Docker Login
uses: docker/login-action@v3
with:
Expand All @@ -59,6 +76,7 @@ jobs:
with:
images: |
zilliqa/otterscan
asia-docker.pkg.dev/prj-p-devops-services-tvwmrf63/zilliqa-public/otterscan
tags: |
type=ref,enable=false,priority=600,prefix=pr-,suffix=,event=pr
type=ref,event=branch
Expand Down