Skip to content

fhgbaguidi/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

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: frodonLD/action-cloud-run@master
  with:
    image: [your-project]/[image]
    registry: gcr.io
    tag: latest
    service: [your-service]
    project: [your-project]
    region: [gcp-region]
    env: [path-to-env-file]
    key: ${{ secrets.GCLOUD_AUTH }}

OR

- name: Deploy service to Cloud Run
  uses: frodonLD/action-cloud-run@master
  with:
    image: [your-project]/[image]
    registry: gcr.io
    tag: latest
    service: [your-service]
    project: [your-project]
    region: [gcp-region]
    serviceyamlfile: [path-to-service-yaml-config-file]
    key: ${{ secrets.GCLOUD_AUTH }}

Your GCLOUD_AUTH secret (or however 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 present on Google's container registries

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.

About

Simple github action to deploy an image revision to Cloud Run

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 93.6%
  • Dockerfile 6.4%