Skip to content

UPDATE: use latest version go #16

UPDATE: use latest version go

UPDATE: use latest version go #16

name: build
on:
push:
branches:
- main
# Environment variables available to all jobs and steps in this workflow
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT }}
jobs:
setup-build-deploy:
name: Setup, Build, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: gcloud auth
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
- name: gcloud setup
uses: google-github-actions/setup-gcloud@v2
- name: Install yq
run: sudo snap install yq
- name: Set COMMIT
run: |
COMMIT=${GITHUB_SHA:0:7} yq -i '.env_variables.COMMIT = strenv(COMMIT)' ./app.yaml
- name: Set LASTMODIFIED
run: |
LASTMOD=$(date -u +%Y-%m-%dT%H:%M:%SZ) yq -i '.env_variables.LASTMOD = strenv(LASTMOD)' ./app.yaml
- name: Deploy to AppEngine
run: |
gcloud app deploy --project=${PROJECT_ID} --quiet