Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 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:
  10. runs-on: ubuntu-latest
  11.  
  12. steps:
  13. - name: Checkout the repository
  14. uses: actions/checkout@v1
  15.  
  16. - name: Check commit sha ...
  17. run: echo ${{ github.sha }}
  18.  
  19. - name: Build the Docker image
  20. uses: actions/docker/cli@master
  21. with:
  22. args: "build --file Dockerfile --tag gcr.io/gear2019v2/gear2019v2-frontend:latest ."
  23.  
  24. - name: Authenticate into Google Cloud Platform
  25. uses: actions/gcloud/auth@master
  26. env:
  27. GCLOUD_AUTH: ${{ secrets.GCLOUD_AUTH }}
  28.  
  29. - name: Configure Docker to use Google Cloud Platform
  30. uses: actions/gcloud/cli@master
  31. with:
  32. args: "auth configure-docker --quiet"
  33.  
  34. - name: Push image to Google Cloud Container Registry
  35. uses: actions/gcloud/cli@master
  36. with:
  37. entrypoint: sh
  38. args: -c "docker push gcr.io/gear2019v2/gear2019v2-frontend:latest"
  39.  
  40. deploy_to_cloud_run:
  41. needs: [ build_and_push_to_gcp ]
  42. runs-on: ubuntu-latest
  43.  
  44. steps:
  45. - name: Authenticate into Google Cloud Platform
  46. uses: actions/gcloud/auth@master
  47. env:
  48. GCLOUD_AUTH: ${{ secrets.GCLOUD_AUTH }}
  49.  
  50. - name: Install beta commands and deploy on Cloud Run
  51. uses: actions/gcloud/cli@master
  52. with:
  53. args: "components install beta --quiet && gcloud components update --quiet && 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