Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. name: Docker Image CI
  2.  
  3. on:
  4. push:
  5. tags:
  6. - release-production-*
  7.  
  8. jobs:
  9. build_and_push_to_gcp_and_deploy_to_cloud_run:
  10. runs-on: ubuntu-latest
  11.  
  12. container:
  13. image: google/cloud-sdk:latest
  14.  
  15. steps:
  16. - name: Checkout the repository
  17. uses: actions/checkout@v1
  18.  
  19. - name: Check commit sha ...
  20. run: echo ${{ github.sha }}
  21.  
  22. - name: Build the Docker image
  23. run: docker build -t gcr.io/gear2019v2/gear2019v2-frontend .
  24.  
  25. - name: Authenticate into Google Cloud Platform
  26. run: gcloud auth activate-service-account github-actions@gear2019v2.iam.gserviceaccount.com --key-file=credentials/gear2019v2-de88db544877.json
  27.  
  28. - name: Configure Docker to use Google Cloud Platform
  29. run: gcloud auth configure-docker --quiet
  30.  
  31. - name: Push image to Google Cloud Container Registry
  32. run: docker push gcr.io/gear2019v2/gear2019v2-frontend:latest
  33.  
  34. - name: Deploy to Cloud Run
  35. run: gcloud beta run deploy gear2019v2-frontend --quiet --image gcr.io/gear2019v2/gear2019v2-frontend:latest --project gear2019v2 --region asia-northeast1 --platform managed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement