Skip to content

Commit

Permalink
Configure continuous deployment (#143)
Browse files Browse the repository at this point in the history
* add config to deploy on gcp

* use node 20
  • Loading branch information
joakimsjo committed Jul 5, 2024
1 parent b10d2c9 commit 4e53390
Showing 1 changed file with 26 additions and 23 deletions.
49 changes: 26 additions & 23 deletions .github/workflows/deploy-on-gcp.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
name: Deploy to Cloud Run
on:
workflow_run:
workflows: ["Build and push image to GCP"]
types:
- completed
workflow_run:
workflows: ["Build and push image to GCP"]
types:
- completed

env:
IMAGE_URL: 'europe-north1-docker.pgk.dev/spire-ros-5lmr/kv-ros/backend:latest'
SERVICE_NAME: 'kv-ros-backend'
IMAGE_URL: "europe-north1-docker.pgk.dev/spire-ros-5lmr/kv-ros/backend:latest"
SERVICE_NAME: "kv-ros-backend"

jobs:
deploy_cloud_run:
name: 'Deploy latest image on Cloud Run'
runs-on: ubuntu-latests
permissions:
contents: 'read'
id-token: 'write'
steps:
- id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCS_ACC_KEY_JSON }}
- id: 'deploy'
uses: 'google-github-actions/deploy-cloudrun@v2'
with:
service: $SERVICE_NAME
image: $IMAGE_URL

deploy_cloud_run:
name: "Deploy latest image on Cloud Run"
runs-on: ubuntu-latests
permissions:
contents: "read"
id-token: "write"
steps:
- id: "setup node"
uses: actions/setup-node@v4
with:
node-version: "20.x"
- id: "auth"
uses: "google-github-actions/auth@v2"
with:
credentials_json: ${{ secrets.GCS_ACC_KEY_JSON }}
- id: "deploy"
uses: "google-github-actions/deploy-cloudrun@v2"
with:
service: $SERVICE_NAME
image: $IMAGE_URL

0 comments on commit 4e53390

Please sign in to comment.