diff --git a/.github/workflows/build-deploy-cloudrun-function.yml b/.github/workflows/build-deploy-cloudrun-function.yml index 379feb6..25b68d9 100644 --- a/.github/workflows/build-deploy-cloudrun-function.yml +++ b/.github/workflows/build-deploy-cloudrun-function.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - staging paths: - 'fivetran-trigger/**' workflow_dispatch: @@ -18,15 +17,9 @@ jobs: build_and_deploy: uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@gcp-cloudrun #temporarily using branch for testing - secrets: - GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} - WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }} - GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} - GCP_SERVICE_ACCOUNT_EMAIL: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }} - RUN_SERVICE_ACCOUNT: ${{ secrets.RUN_SERVICE_ACCOUNT }} - GCP_REGION: ${{ secrets.GCP_REGION }} with: function_name: ${{ github.event.inputs.function_name }} entry_point: hello_http runtime: python312 + environment: production diff --git a/.github/workflows/build-deploy-cloudrun-function_poc.yml b/.github/workflows/build-deploy-cloudrun-function_poc.yml new file mode 100644 index 0000000..074657f --- /dev/null +++ b/.github/workflows/build-deploy-cloudrun-function_poc.yml @@ -0,0 +1,33 @@ +name: Build & Deploy Cloudrun Function POC + +on: + push: + branches: + - poc + paths: + - 'fivetran-trigger/**' + workflow_dispatch: + inputs: + function_name: + description: 'The name of the Cloud Function to deploy' + required: true + default: 'fivetran-trigger' + entry_point: + description: 'The python function serving as the entry point' + required: true + default: 'hello_http' + runtime: + description: 'The function runtime' + required: true + default: 'python312' + +jobs: + build_and_deploy: + + uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@gcp-cloudrun #temporarily using branch for testing + with: + function_name: ${{ github.event.inputs.function_name }} + entry_point: hello_http + runtime: python312 + environment: poc + diff --git a/.github/workflows/build-deploy-cloudrun-function_staging.yml b/.github/workflows/build-deploy-cloudrun-function_staging.yml new file mode 100644 index 0000000..f18a66c --- /dev/null +++ b/.github/workflows/build-deploy-cloudrun-function_staging.yml @@ -0,0 +1,33 @@ +name: Build & Deploy Cloudrun Function Staging + +on: + push: + branches: + - staging + paths: + - 'fivetran-trigger/**' + workflow_dispatch: + inputs: + function_name: + description: 'The name of the Cloud Function to deploy' + required: true + default: 'fivetran-trigger' + entry_point: + description: 'The python function serving as the entry point' + required: true + default: 'hello_http' + runtime: + description: 'The function runtime' + required: true + default: 'python312' + +jobs: + build_and_deploy: + + uses: CruGlobal/.github/.github/workflows/build-deploy-cloudrun-function.yml@gcp-cloudrun #temporarily using branch for testing + with: + function_name: ${{ github.event.inputs.function_name }} + entry_point: hello_http + runtime: python312 + environment: staging +