Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name: Docker Image CI
- on:
- push:
- tags:
- - release-production-*
- jobs:
- build_and_push_to_gcp_and_deploy_to_cloud_run:
- runs-on: ubuntu-latest
- container:
- image: google/cloud-sdk:latest
- steps:
- - name: Checkout the repository
- uses: actions/checkout@v1
- - name: Check commit sha ...
- run: echo ${{ github.sha }}
- - name: Build the Docker image
- run: docker build -t gcr.io/gear2019v2/gear2019v2-frontend .
- - name: Authenticate into Google Cloud Platform
- run: gcloud auth activate-service-account github-actions@gear2019v2.iam.gserviceaccount.com --key-file=credentials/gear2019v2-de88db544877.json
- - name: Configure Docker to use Google Cloud Platform
- run: gcloud auth configure-docker --quiet
- - name: Push image to Google Cloud Container Registry
- run: docker push gcr.io/gear2019v2/gear2019v2-frontend:latest
- - name: Deploy to Cloud Run
- 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