deploy-cloud-functions icon indicating copy to clipboard operation
deploy-cloud-functions copied to clipboard

event_trigger_type syntax in documentation doesn't work

Open dwmintz opened this issue 2 years ago • 0 comments

TL;DR

This tutorial suggests that you use the providers/cloud.storage/eventTypes/object.finalize syntax for event triggers, but this leads to the extremely cryptic "The request has errors" error.

Using the google.storage.object.finalize syntax instead worked, but I only discovered that in this issue

Expected behavior

For the function to deploy, or at least provide a usable error.

Observed behavior

status: {
code: 3
message: "The request has errors"
}

Action YAML

name: Deploy Google Cloud Function
on: push

env:
  jurisdiction: ***-dev
  creds: ${{ secrets.ENV_GOOGLE_APP_CREDS_FILE }} 


jobs:
  deploy:
    runs-on: ubuntu-latest
    environment: ****-dev

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - id: 'auth'
        name: 'Authenticate to Google Cloud'
        uses: 'google-github-actions/auth@v0'
        with:
          credentials_json: '${{ env.creds }}'

      - name: Deploy Cloud Function
        id: deploy-background-function
        uses: google-github-actions/[email protected]
        with:
          name: ******
          runtime: python37
          event_trigger_type: providers/cloud.storage/eventTypes/object.finalize
          event_trigger_resource: projects/_/buckets/******.appspot.com
          entry_point: ******


### Log output

_No response_

### Additional information

_No response_

dwmintz avatar Mar 17 '22 17:03 dwmintz