Skip to content

Fix the search bar (and add bech32 search) (#60) #69

Fix the search bar (and add bech32 search) (#60)

Fix the search bar (and add bech32 search) (#60) #69

name: Publish Docker image
on:
push:
branches:
- "main"
- "develop"
tags:
- "v*"
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
permissions:
id-token: write
contents: write
packages: write
steps:
- name: Prepare
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- 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:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Docker Metadata action
id: meta
uses: docker/metadata-action@v5
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
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=semver,pattern={{raw}}
- name: Build and push by digest
id: build
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max