-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5744149
commit 8231637
Showing
1 changed file
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |