Skip to content

Commit

Permalink
update template and add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cru-Luis-Rodriguez committed Oct 29, 2024
1 parent 5744149 commit 8231637
Showing 1 changed file with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions workflow-templates/build-deploy-cloudrun-function.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
name: Build & Deploy Cloudrun Functions
name: Build & Deploy Cloudrun Function POC

on:
push:
branches:
- main
- staging
# Automatically deploy $default-branch. Create a workflow per branch.
- $default-branch
paths:
- 'function-name/**'
- 'Path-to-fuction/**' # Update with path to the function
workflow_dispatch:
inputs:
function_name:
description: 'The name of the Cloud Function to deploy'
required: true
default: 'function-name'
default: 'function-name' # Update with function name
entry_point:
description: 'The python function serving as the entry point'
required: true
default: 'entry_point' # Update with entry point
runtime:
description: 'The function runtime'
required: true
default: 'runtime' # Update with runtime

jobs:
build_and_deploy:

uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@gcp-cloudrun #temporarily using branch for testing
uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@v1
with:
function_name: ${{ github.event.inputs.function_name }}
entry_point: hello_http
runtime: python312
environment: production
entry_point: { entry_point } # hello_http
runtime: { runtime } # python312
environment: { environment } # production
secrets:
GCP_PROJECT_ID: ${{ vars.GCP_PROJECT_ID }}
GCP_PROJECT_NUMBER: ${{ vars.GCP_PROJECT_NUMBER }}
WORKLOAD_IDENTITY_POOL: ${{ vars.WORKLOAD_IDENTITY_POOL }}
WORKLOAD_IDENTITY_PROVIDER: ${{ vars.WORKLOAD_IDENTITY_PROVIDER }}
GCP_SERVICE_ACCOUNT: ${{ vars.GCP_SERVICE_ACCOUNT }}
GCP_SERVICE_ACCOUNT_EMAIL: ${{ vars.GCP_SERVICE_ACCOUNT_EMAIL }}
GCP_REGION: ${{ vars.GCP_REGION }}

0 comments on commit 8231637

Please sign in to comment.