denoland / deployctl

Command line tool for Deno Deploy
https://deno.com/deploy
MIT License
332 stars 52 forks source link

APIError: GitHub event 'schedule' is not supported. #110

Closed mvdschee closed 2 years ago

mvdschee commented 2 years ago

Hello while building my project in GitHub actions for a custom build process I ran in to a problem with deployctl failing if the deployment was trigger on a schedule in GitHub actions

Screenshot 2022-04-08 at 11 13 28

the CD.yaml I use

name: Continuous Deployment

on:
    push:
        branches:
            - main
    pull_request:
        branches:
            - main
    schedule:
        # every hour
        - cron: '0 * * * *'
    workflow_dispatch:

jobs:
    ci:
        runs-on: ${{ matrix.os }}
        permissions:
            id-token: write
            contents: read

        strategy:
            matrix:
                os: [ubuntu-latest]
                deno-version: [1.20.4]

        steps:
            - name: Git Checkout Deno Module
              uses: actions/checkout@v2

            - name: Use Deno Version ${{ matrix.deno-version }}
              uses: denolib/setup-deno@v2
              with:
                  deno-version: ${{ matrix.deno-version }}

            - name: Run build 👷
              run: make build

            - name: Upload to Deno Deploy
              uses: denoland/deployctl@v1
              with:
                  project: '******'
                  entrypoint: './main.ts'

Looking at the code why this would happen I didn't came any closer then /deployctl/blob/main/action/index.js where you start defining the the switch case for the event types. Either the event type has an extra step which is not defined or the API it self gets an type it's confused about.

Here is a build that was triggered on a push that did succeed

Screenshot 2022-04-08 at 11 24 17
satyarohith commented 2 years ago

Hi @mvdschee. We landed the feature. It should be live in a couple of hours.

mvdschee commented 2 years ago

@satyarohith Great to hear, I will test it once it's there!