Skip to content

v1.5.2-rc-2

v1.5.2-rc-2 #69

name: Mainnet Build and Publish Image to GCR
on:
release:
types: [published]
jobs:
deploy_mainnet:
runs-on: ubuntu-latest
if: |
! contains(github.event.release.tag_name, '-rc-')
steps:
- uses: actions/checkout@v2
- name: Setup GCloud SDK
uses: google-github-actions/[email protected]
with:
project_id: ${{ secrets.GCP_PROJECT }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Authorize Docker
run: gcloud auth configure-docker
- name: Build and Push Container
run: |-
docker build \
-t gcr.io/${{ secrets.GCP_PROJECT }}/${{ secrets.SERVICE }}:${{ github.event.release.tag_name }} \
-t gcr.io/${{ secrets.GCP_PROJECT }}/${{ secrets.SERVICE }}:latest \
-f build/Dockerfile .
docker push gcr.io/${{ secrets.GCP_PROJECT }}/${{ secrets.SERVICE }}:${{ github.event.release.tag_name }}
docker push gcr.io/${{ secrets.GCP_PROJECT }}/${{ secrets.SERVICE }}:latest
- name: Dispatch image release event
uses: peter-evans/[email protected]
with:
token: ${{ secrets.REPO_GHA_PAT }}
repository: ${{ github.repository }}
event-type: trigger-mainnet-image-release
client-payload: '{"tag": "${{ github.event.release.tag_name }}"}'