Skip to content

Merge branch 'main' of https://github.com/nyampass/keystone-lang #7

Merge branch 'main' of https://github.com/nyampass/keystone-lang

Merge branch 'main' of https://github.com/nyampass/keystone-lang #7

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
env:
SERVICE_NAME: ${{ secrets.SERVICE_NAME }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_REGION: ${{ secrets.GCP_REGION }}
IMAGE: asia.gcr.io/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.SERVICE_NAME }}:${{ github.sha }}
jobs:
deploy-to-cloud-run:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"
- name: Configure docker to use the gcloud cli
run: gcloud auth configure-docker --quiet
- name: Build a docker image
run: docker build -t ${{ env.IMAGE }} .
- name: Push the docker image
run: docker push ${{ env.IMAGE }}
- name: Deploy to Cloud Run
run: |
gcloud run deploy $SERVICE_NAME \
--image $IMAGE \
--project $GCP_PROJECT_ID \
--region $GCP_REGION \
--platform=managed \
--allow-unauthenticated \
--quiet \
--set-env-vars=ENV=PRODUCTION