Skip to content

Commit

Permalink
Modify github action to deploy dbt trigger (#30)
Browse files Browse the repository at this point in the history
* Modify github action yml

* setup individual function build jobs

* modify workflow name

---------

Co-authored-by: Luis Rodriguez <[email protected]>
  • Loading branch information
tony-guan-cru and cru-Luis-Rodriguez authored Jan 6, 2025
1 parent 7af7225 commit 5e1fce7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build-deploy-cloudrun-dbt-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build & Deploy DBT Trigger

on:
push:
branches:
- main
- poc
- staging
paths:
- 'dbt-trigger/**'
workflow_dispatch:

jobs:
build_and_deploy_dbt_trigger:
uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@v1
with:
function_name: dbt-trigger
entry_point: trigger_dbt_job
runtime: python312
environment: ${{ github.ref == 'refs/heads/main' && 'production' || github.ref == 'refs/heads/poc' && 'poc' || github.ref == 'refs/heads/staging' && 'staging' }}
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 }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Deploy Cloudrun Functions
name: Build & Deploy Fivetran Trigger

on:
push:
Expand All @@ -11,7 +11,7 @@ on:
workflow_dispatch:

jobs:
build_and_deploy:
build_and_deploy_fivetran_trigger:
uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@v1
with:
function_name: fivetran-trigger
Expand All @@ -25,4 +25,4 @@ jobs:
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 }}
GCP_REGION: ${{ vars.GCP_REGION }}

0 comments on commit 5e1fce7

Please sign in to comment.