Skip to content

Cloud Run with docker build and push to GCR

Actions
Authenticate with gcloud, build and push image to GCR and deploy as a new revision to Cloud Run
1.5
Latest
Star (5)

Github Action for Google Cloud Run

An GitHub Action for deploying revisions to Google Cloud Run.

Usage

Docker image

In your actions workflow, somewhere after the step that builds gcr.io/<your-project>/<image>, insert this:

- name: Deploy service to Cloud Run
  uses: stefda/[email protected]
  with:
    working_directory: [service-api]
    service_key: ${{ secrets.GCP_CLOUD_RUN_SERVICE_KEY }}
    project: [your-project]
    registry: [eu.gcr.io]
    region: [gcp-region]
    env: [path-to-env-file]

Your GCP_CLOUD_RUN_SERVICE_KEY secret (or whatever you name it) must be a base64 encoded gcloud service key with the following permissions:

  • Service Account User
  • Cloud Run Admin
  • Storage Admin

The env input is optional.

Cloud Run with docker build and push to GCR is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Authenticate with gcloud, build and push image to GCR and deploy as a new revision to Cloud Run
1.5
Latest

Cloud Run with docker build and push to GCR is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.