pkaramol
pkaramol

Reputation: 19312

Trigger GitHub actions' workflow when some workflows themselves change

Ι 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?

Upvotes: 0

Views: 838

Answers (1)

GuiFalourd
GuiFalourd

Reputation: 22890

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).

Upvotes: 1

Related Questions