Publish Images #105
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Images | |
on: | |
workflow_dispatch: | |
description: 'Manual run' | |
release: | |
types: [published] | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: haya14busa/action-cond@v1 | |
id: latestTag | |
with: | |
cond: ${{ github.event.release.target_commitish == 'main' }} | |
if_true: "latest" | |
if_false: "hotfix" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@main | |
with: | |
path: guardian-service | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- id: 'auth' | |
name: 'Authenticate to Google Cloud' | |
uses: 'google-github-actions/auth@v0' | |
with: | |
workload_identity_provider: 'projects/101730247931/locations/global/workloadIdentityPools/hedera-registry-pool/providers/hedera-registry-gh-actions' | |
service_account: '[email protected]' | |
token_format: 'access_token' | |
- uses: 'docker/login-action@v1' | |
with: | |
registry: 'gcr.io' # or REGION-docker.pkg.dev | |
username: 'oauth2accesstoken' | |
password: '${{ steps.auth.outputs.access_token }}' | |
- name: application-events-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./application-events/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/application-events:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/application-events:latest' | |
- name: application-events | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./application-events/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/application-events:${{ steps.package-version.outputs.current-version}}' | |
- name: logger-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./logger-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/logger-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/logger-service:latest' | |
- name: logger-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./logger-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/logger-service:${{ steps.package-version.outputs.current-version}}' | |
- name: notification-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./notification-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/notification-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/notification-service:latest' | |
- name: notification-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./notification-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/notification-service:${{ steps.package-version.outputs.current-version}}' | |
- name: auth-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./auth-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/auth-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/auth-service:latest' | |
- name: auth-service-demo-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./auth-service/Dockerfile.demo | |
push: true | |
tags: 'gcr.io/hedera-registry/auth-service-demo:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/auth-service-demo:latest' | |
- name: auth-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./auth-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/auth-service:${{ steps.package-version.outputs.current-version}}' | |
- name: auth-service-demo | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./auth-service/Dockerfile.demo | |
push: true | |
tags: 'gcr.io/hedera-registry/auth-service-demo:${{ steps.package-version.outputs.current-version}}' | |
- name: api-gateway-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./api-gateway/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/api-gateway:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/api-gateway:latest' | |
- name: api-gateway-demo-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./api-gateway/Dockerfile.demo | |
push: true | |
tags: 'gcr.io/hedera-registry/api-gateway-demo:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/api-gateway-demo:latest' | |
- name: api-gateway | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./api-gateway/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/api-gateway:${{ steps.package-version.outputs.current-version}}' | |
- name: api-gateway-demo | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./api-gateway/Dockerfile.demo | |
push: true | |
tags: 'gcr.io/hedera-registry/api-gateway-demo:${{ steps.package-version.outputs.current-version}}' | |
- name: policy-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./policy-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/policy-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/policy-service:latest' | |
- name: policy-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./policy-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/policy-service:${{ steps.package-version.outputs.current-version}}' | |
- name: guardian-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./guardian-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/guardian-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/guardian-service:latest' | |
- name: guardian-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./guardian-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/guardian-service:${{ steps.package-version.outputs.current-version}}' | |
- name: worker-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./worker-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/worker-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/worker-service:latest' | |
- name: worker-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./worker-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/worker-service:${{ steps.package-version.outputs.current-version}}' | |
- name: topic-viewer-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./topic-viewer/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/topic-viewer:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/topic-viewer:latest' | |
- name: topic-viewer | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./topic-viewer/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/topic-viewer:${{ steps.package-version.outputs.current-version}}' | |
- name: mrv-sender-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./mrv-sender/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/mrv-sender:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/mrv-sender:latest' | |
- name: mrv-sender | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./mrv-sender/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/mrv-sender:${{ steps.package-version.outputs.current-version}}' | |
- name: analytics-service-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./analytics-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/analytics-service:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/analytics-service:latest' | |
- name: analytics-service | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./analytics-service/Dockerfile | |
push: true | |
tags: 'gcr.io/hedera-registry/analytics-service:${{ steps.package-version.outputs.current-version}}' | |
- name: web-proxy-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./web-proxy/Dockerfile.ci | |
push: true | |
tags: 'gcr.io/hedera-registry/frontend:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/frontend:latest' | |
- name: web-proxy | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./web-proxy/Dockerfile.ci | |
push: true | |
tags: 'gcr.io/hedera-registry/frontend:${{ steps.package-version.outputs.current-version}}' | |
- name: web-proxy-demo-latest | |
if: ${{ steps.latestTag.outputs.value == 'latest'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./web-proxy/Dockerfile.demo | |
push: true | |
tags: 'gcr.io/hedera-registry/frontend-demo:${{ steps.package-version.outputs.current-version}}, gcr.io/hedera-registry/frontend-demo:latest' | |
- name: web-proxy-demo | |
if: ${{ steps.latestTag.outputs.value == 'hotfix'}} | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./web-proxy/Dockerfile.demo | |
push: true | |
tags: 'gcr.io/hedera-registry/frontend-demo:${{ steps.package-version.outputs.current-version}}' |