Skip to content

Deploying GCF gets GitHub Action stuck in infinite loop #123

@r002

Description

@r002

Question

Apologies if I'm doing something wrong. But I followed all of the documentation here and here; am trying to also deploy my GCF (a function called UpdateMemberMetrics) after my GAE deploys. The GitHub Action deploys my GAE fine but then when it goes to deploy my GCF, it gets stuck in this weird infinite loop that I need to cancel the workflow on manually:

image

FWIW, the GCF itself deploys fine. When I check the console, it's there and has only incremented one version:

image

image

My GitHub Action yaml:

on:
  push:
    branches:
      - main

name: Deploy to Google App Engine PROD

jobs:
  deploy:
    environment: prod
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Deploy to App Engine
        id: deploy
        uses: google-github-actions/deploy-appengine@v0.2.0
        with:
          deliverables: app.yaml
          project_id: ${{ secrets.GCP_PROJECT }}
          credentials: ${{ secrets.GCP_SA_KEY }}

      - name: Deploy Google Cloud Functions
        id: deploy-gcf
        uses: google-github-actions/deploy-cloud-functions@main
        with:
          name: UpdateMemberMetrics
          runtime: go113
          env_vars_file: cloudfunctions.yaml
          project_id: ${{ secrets.GCF_PROJECT }}
          credentials: ${{ secrets.GCP_SA_KEY }}
          event_trigger_type: google.pubsub.topic.publish
          event_trigger_resource: ${{ secrets.TOPIC }}
          event_trigger_service: pubsub.googleapis.com

Am I doing something wrong?

(Btw-- when I run gcloud from my console directly; the GCF deploys fine. Ie. This works:
$> gcloud functions deploy UpdateMemberMetrics --trigger-topic $TOPIC --runtime go113 --env-vars-file ./cloudfunctions.yaml)

Would be grateful for any help/advice. Thank you! 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions