0

Ι want to create a workflow that is triggered when some other .github/workflow files change.

I want to monitor all the .github/workflow starting with a specific prefix. i.e. foo_, as in .github/workflow/foo_1.yaml , .github/workflow/foo_2.yaml etc.

Is it possible to specify such a pattern on the workflow trigger?

1 Answer 1

1

Yes, you can do it natively using the push event trigger, with the paths subtype.

Example:

on:
  push:
    paths:
      - '.github/workflows/foo_**'

Note that if there is another trigger event configured in the workflow, it can start by being triggering by one OR the other (not AND).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.