Skip to content

Commit

Permalink
Add production deployment in CI/CD workflow
Browse files Browse the repository at this point in the history
The cicd.yml file has
  • Loading branch information
bgharbi-globalpos committed Feb 8, 2024
1 parent 3b4e1c7 commit c735b98
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,26 @@ jobs:
service: gol2
image: ${{ env.image }}
region: europe-west9
Deploy-prod:
if: startsWith(github.event.ref, 'refs/tags/v')
needs: Build
runs-on: ubuntu-latest
env:
image: ${{ needs.Build.outputs.image }}
environment:
name: production
url: https://gol2.io
steps:
- uses: 'google-github-actions/auth@v2'
id: auth
with:
token_format: access_token
project_id: ${{ env.GCP_Project_ID }}
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'

- name: Deploy to Cloud Run
uses: google-github-actions/deploy-cloudrun@v2
with:
service: gol2
image: ${{ env.image }}
region: europe-west9

0 comments on commit c735b98

Please sign in to comment.