Skip to content

Autocomplete fix (#275) #103

Autocomplete fix (#275)

Autocomplete fix (#275) #103

Workflow file for this run

name: Docker Build and Push to GCR
on:
push:
branches:
- main
# This job uses RafikFarhad's GitHub action to build and
# push a docker image to a specified GCP repository
jobs:
build-and-push-to-gcr:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # to get all tags
- name: Generate Image Tag
id: get-tag
run: |
REV=$(git rev-list --tags --max-count=1)
IMAGE_TAG=$(git describe --tags $REV)
echo "IMAGE_TAG=${IMAGE_TAG//v}"
echo "IMAGE_TAG=${IMAGE_TAG//v}" >> $GITHUB_OUTPUT
- name: Build and Push Image
uses: RafikFarhad/push-to-gcr-github-action@v5-beta
with:
gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # not needed if you use google-github-actions/auth
registry: us-central1-docker.pkg.dev
project_id: monarch-initiative
image_name: monarch-api/monarch-api
image_tag: latest, ${{ steps.get-tag.outputs.IMAGE_TAG }}
dockerfile: ./backend/Dockerfile
# This version uses Google's authentication Action directly,
# and makes use of this repository's Makefile.
# It currently fails at the push step.
#
# jobs:
# build-and-push-to-gcp:
# runs-on: ubuntu-latest
# permissions:
# contents: 'read'
# id-token: 'write'
# steps:
# - name: Checkout
# uses: 'actions/checkout@v3'
# - name: 'Authenticate to Google Cloud'
# id: 'auth'
# uses: 'google-github-actions/auth@v1'
# with:
# workload_identity_provider: projects/1032453560151/locations/global/workloadIdentityPools/monarch-github-actions/providers/monarch-github-wip
# service_account: '[email protected]'
# - name: Build and Push to GCP
# run: |
# pip install poetry
# make docker-build
# make docker-push