Skip to content

Possibility to declare custom on triggers for Github Actions publish #8639

Open
@arxdeus

Description

@arxdeus

Hello! At the moment we can create releases at pub via tags or workflow_dispatch, but on Github Actions there exists another type of workflows - Reusable Workflows that can be executed from any other workflows

Their on handler should be declared as workflow_call, so, it can't be used to publish, even if root workflow was initiated via workflow_dispatch

Flow:

  1. run parent workflow via workflow_dispatch (w/ some inputs):

declare job inside in such way:

uses: [reusable_workflow_repo]/publish.yaml@v1: 
  with: [some_inputs]'
  1. it will run workflow_call of [reusable_workflow_repo]/publish.yaml@v1

which will run flutter/dart pub publish here -> drops error because it runs as workflow_call and not as workflow_dispatch (it ignores the fact that it was ran as workflow_dispatch at inital workflow)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions