Skip to content

Update cron.yaml

Update cron.yaml #71

Workflow file for this run

on:
push:
branches:
- main
paths:
- 'api/**'
env:
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
jobs:
deploy:
name: Checkout, connect to GCl, Deploy and Check status, Remove old versions
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Authenticate with Google Cloud
id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
workload_identity_provider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
- name: Deploy API to App Engine
id: 'deploy_api'
uses: 'google-github-actions/deploy-appengine@v1'
with:
project_id: ${{ env.PROJECT_ID }}
working_directory: ./api
deliverables:
api.yaml
cron.yaml
../dispatch.yaml
- name: Check app deployment status
run: echo ${{ steps.deploy_api.outputs.serving_status }}
- name: Test
run: curl ${{ steps.deploy_api.outputs.version_url }}
- name: Remove old API versions
run: for version in $(gcloud app versions list --service api --sort-by '~VERSION.ID' --format 'value(VERSION.ID)' | sed 1,5d); do gcloud app versions delete "$version" --service api --quiet; done