How to separate push events in Actions?

Hi!

Is there some method, how to separate push event, that creates a file in repo, from push event, that removes or changes (at least, removes) it?

Docs say that this event ignores (am I right?) types. But we already tried paths (like Release/*.exe), and push event reacts on them correctly.

Thanks for answers!

@adslbarxatov,

Yes, the push event does not have optional activity types.

You can use the path filters to configure a workflow to run only when there is any modified file can match the patterns you specified.
Any file that is added, updated or deleted in the pushed commits can let the push event trigger the workflow.

If you really need the push event can support some activity types, I recommend that you can directly share a feature request in the Feedback form for GitHub.
That will allow you to directly interact with the appropriate engineering team, and make it more convenient for the engineering team to collect and categorize your suggestions.

As a workaround, you could use actions/checkout@v2, probably with depth: 0, and use Git to determine whether files were added, modified or deleted. Based on that information, you can skip individual jobs.

Thank you!

Looks like this method allows us to make events triggering more flexible and accurate. But it’s still requires additional preparations. So, we think that this question can get simpler answer in the future

Thank you!

You’re right: trigger file is the simplest way to emulate needed event conditions. But anyway we’ll offer push types in order to solve this using only .yaml file (without anything else)