v1.5.2-rc-2 #69
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: 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 }}"}' |