diff --git a/.github/workflows/build-deploy-cloudrun-function.yml b/.github/workflows/build-deploy-cloudrun-function.yml index 115dfbf..40d185a 100644 --- a/.github/workflows/build-deploy-cloudrun-function.yml +++ b/.github/workflows/build-deploy-cloudrun-function.yml @@ -80,9 +80,15 @@ jobs: GCP_REGION: ${{ secrets.GCP_REGION }} run: | gcloud config set project ${{ secrets.GCP_PROJECT_ID }} - gcloud functions deploy ${{ inputs.function_name }}-test \ - --flags-file=function_config.yml \ + gcloud functions deploy ${{ inputs.function_name }}-${{ needs.build.outputs.build-number }} \ + --no-allow-unauthenticated \ --region $GCP_REGION \ + --gen2 \ + --source=./${{ inputs.function_name }} \ + --runtime=python312 \ + --entry-point=hello_http \ + --trigger-http \ + --set-secrets=API_KEY=${{ inputs.function_name }}_API_KEY:latest,API_SECRET=${{ inputs.function_name }}_API_SECRET:latest \ --build-service-account=projects/${{ secrets.GCP_PROJECT_ID }}/serviceAccounts/${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }} \ --run-service-account=${{ secrets.RUN_SERVICE_ACCOUNT }}