Skip to content

Commit

Permalink
deploy to cloud run
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderjophus committed Oct 29, 2023
1 parent 726eb29 commit 3b55d73
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,31 @@ jobs:
run: |-
docker tag $IMAGE_NAME:latest gcr.io/$PROJECT_ID/$IMAGE_NAME:latest
docker push gcr.io/$PROJECT_ID/$IMAGE_NAME:latest
deploy-graphql:
permissions:
contents: 'read'
id-token: 'write'

steps:
- uses: 'actions/checkout@v3'

- name: Login to GCR
env:
PROJECT_ID: f1graph
uses: google-github-actions/setup-gcloud@v0.3.0 #checkouts GCR repo, so this workflow can access it
with:
service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }} #parse the value of repository secret called SERVICE_ACCOUNT_KEY that we have created earlier
project_id: ${{ env.PROJECT_ID }} #parse the value of env called PROJECT_ID
export_default_credentials: true

- id: 'deploy'
uses: 'google-github-actions/deploy-cloudrun@v1'
env:
IMAGE_NAME: formulagraphql
with:
service: backend
image: $IMAGE_NAME

- name: 'Use output'
run: 'curl "${{ steps.deploy.outputs.url }}"'

0 comments on commit 3b55d73

Please sign in to comment.