Skip to content

Simple github action to deploy an image revision to Cloud Run

License

Notifications You must be signed in to change notification settings

hackinteach/action-cloud-run

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo was forked from https://github.com/marketplace/actions/cloud-run

Github Action for Google Cloud Run

An GitHub Action for deploying revisions to Google Cloud Run.

Usage

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

- name: Deploy service to Cloud Run
  uses: hackinteach/action-cloud-run@v1.0
  with:
    image: gcr.io/[your-project]/[image]
    service: [your-service]
    project: [your-project]
    region: [gcp-region]
    env: [path-to-env-file]
    service key: ${{ secrets.GCLOUD_AUTH }}

Your GCLOUD_AUTH 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 image must be "pushable" to one of Google's container registries, i.e. it should be in the gcr.io/[project]/[image] or eu.gcr.io/[project]/[image] format.

The env input is optional. If you don't provide a path to env file the run deployment will be triggered with the --clear-env-vars flag.

Add cloud_sql input to link to CloudSQL instance.

About

Simple github action to deploy an image revision to Cloud Run

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 89.9%
  • Dockerfile 10.1%