Skip to content

Deploying only cron.yaml fails on output parsing #353

@TheEdda

Description

@TheEdda

TL;DR

When deploying only cron jobs with gcloud app deploy api/cron.yaml --promote the action fails after the cronjobs are deployed.

Expected behavior

The action doesn't fail when successfully deploying only cron jobs.

Observed behavior

The action fails on output parsing, specifically complains about versions field being empty.

Deploying from CLI gives JSON output:

{
  "configs": [
    "cron"
  ],
  "versions": []
}

Clearly the versions array is empty, but since the cronjobs deploy successfully this is also clearly a valid state to be in.

Action YAML

---
name: staging

jobs:
  deploy:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: api
    steps:
      - id: "auth"
        uses: "google-github-actions/auth@v2"
        with:
          credentials_json: ${{ secrets.STAGING_GCP_CREDENTIALS }}
      - name: Deploy cron
        uses: google-github-actions/deploy-appengine@v2
        with:
          deliverables: api/cron.yaml

Log output

Run google-github-actions/deploy-appengine@v2
  with:
    deliverables: api/cron.yaml
    promote: true
Successfully authenticated
Running: gcloud app deploy --quiet --format json api/cron.yaml --promote
Error: google-github-actions/deploy-appengine failed with: failed to parse deploy response: missing or empty "versions", stdout: ***
  "configs": [
    "cron"
  ],
  "versions": []
***

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions