6

I want to trigger a workflow that deploys the build. I want to make sure of the following:

  1. CI workflow is completed
  2. branch is develop
  3. there are some changes in src/**
on:
  workflow_run:
    workflows: ['CI']
    branches: [develop]
    paths: ['src/**']
    types:
      - completed

It seems the above approach is not supported , is there any other way?

iamfotx
  • 63
  • 4

1 Answers1

2

Considering the workflows+branches combo should work, but paths: does not exist in the workflow_run context, you might consider using actions/verify-changed-files

That way, you can trigger an intermediate workflow which would check which files have changed.
Then the next step can be run only if the previous step (file check) has succeeded (using success())

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250