Skip to content

UPDATE: link to svg favicon #8

UPDATE: link to svg favicon

UPDATE: link to svg favicon #8

Workflow file for this run

name: build
on:
push:
branches:
- main
# Environment variables available to all jobs and steps in this workflow
# NOTE: these aren't really secret, but there aren't non-secret GHA variables
env:
RUN_PROJECT: ${{ secrets.RUN_PROJECT }}
RUN_REGION: ${{ secrets.RUN_REGION }}
RUN_SERVICE: ${{ secrets.RUN_SERVICE }}
jobs:
setup-build-deploy:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: 'Auth for GCloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: 'Set up GCloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 363.0.0'
#project_id: ${RUN_PROJECT}
- name: GCloud CLI set project (this shouldn't be necessary)
run: |
gcloud config set project ${RUN_PROJECT}
- name: 'Check GCloud CLI'
run: 'gcloud info'
- name: Build
run: |
docker build \
--build-arg COMMIT=${GITHUB_SHA:0:7} \
--build-arg LASTMOD=$(date -u +%Y-%m-%dT%H:%M:%SZ) \
--tag gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA .
- name: GCloud auth to Docker
run: |
gcloud auth configure-docker
- name: Push to GCloud Container Registry
run: |
docker push gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA
- name: Deploy to CloudRun
run: |
gcloud run deploy ${RUN_SERVICE} \
--allow-unauthenticated \
--image gcr.io/${RUN_PROJECT}/${RUN_SERVICE}:$GITHUB_SHA \
--platform managed \
--project ${RUN_PROJECT} \
--region ${RUN_REGION}