Skip to content

OUTPOST-181 ofsted feed client #30

OUTPOST-181 ofsted feed client

OUTPOST-181 ofsted feed client #30

Workflow file for this run

# This is a basic workflow to create, configure and deploy artefacts and resources
# for the PPE Inventory project in the DEMO environment
name: Ofsted client container
on:
push:
branches:
[OUTPOST-181-update-ofsted-feed-application-to-work-with-new-certificate]
paths:
- "ofsted-client/**"
- ".github/workflows/ofsted-client.yml"
jobs:
ofsted-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
project_id: ${{ secrets.PROJECT_ID }}
# Deploy the container
# see: https://cloud.google.com/run/docs/locations
# NB Cloud Run is currently available in eurompe-west1 (Belgium) and europe-west2 (Netherlands) but not europe-west2 (London)
- name: Build feed-client image
run: |
cd ofsted-client
project_id=$(gcloud config get-value project)
gcloud builds submit --tag gcr.io/${project_id}/ofsted-feed-client --timeout 15m
- name: Deploy feed-client container
run: |
project_id=$(gcloud config get-value project)
project_number=$(gcloud projects describe $project_id --format="value(projectNumber)")
function_url=https://europe-west2-${project_id}.cloudfunctions.net/ofsted_feed_proxy
gcloud run deploy ofsted-feed-client --image=gcr.io/${project_id}/ofsted-feed-client \
--platform=managed --region=europe-west1 --allow-unauthenticated \
--update-env-vars=FUNCTION_URL=${function_url},PROJECT_ID=${project_id}