starter-workflows icon indicating copy to clipboard operation
starter-workflows copied to clipboard

Passing data between workflows

Open vinayada1 opened this issue 1 year ago • 0 comments

We want to achieve the following steps via github workflows:-

  1. A PR is created against a repo
  2. That triggers an approval which needs to be approved by a certain group of people
  3. Once it is approved, we can run functional tests in the repo.

We are achieving this using the following:-

  • We have two workflows: functional_tests and functional_tests_approval. In the functional_tests one, we have added the following workflow trigger:-
  • name: Functional tests on: ..... workflow_run: workflows: ['Approve Functional Tests'] types: - completed

This will trigger this workflow once the functional_tests_approval workflow is completed (test run is approved). What we also want to achieve is skip the approval (auto-approve the test run) when only a certain file is changed. For this, we want to pass data between the workflows so that the approval workflow can send information to the test run workflow based on which it can decide whether to run tests or not.

We have found workarounds to achieve this but the overall workflows get very complicated. If this feature is supported by github workflows, it will simplify these cases

vinayada1 avatar Jan 23 '24 18:01 vinayada1