An GitHub Action for deploying revisions to Google Cloud Run.
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.