Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmeds committed Jul 8, 2024
1 parent d1f768b commit 1663e4a
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- "main"
- "develop"
- internal/registry
tags:
- "v*"

Expand All @@ -20,7 +21,8 @@ jobs:
platform:
- linux/amd64
permissions:
contents: read
id-token: write
contents: write
packages: write

steps:
Expand All @@ -40,6 +42,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 +77,7 @@ jobs:
with:
images: |
zilliqa/otterscan
asia-docker.pkg.dev/prj-p-devops-services-tvwmrf63/zilliqa-private/otterscan
tags: |
type=ref,enable=false,priority=600,prefix=pr-,suffix=,event=pr
type=ref,event=branch
Expand Down

0 comments on commit 1663e4a

Please sign in to comment.