I’m struggle to get the behaviour I want with GitHub Actions.
What I’m after is:
- When a developer pushes a commit to GitHub, the “push” workflow occurs.
- When a release is made, the “release” workflow occurs, but not the “push” workflow.
- Changes to certain files (i.e. setup.py) do not trigger the “push” workflow
This is the YAML I believe should work for the push workflow:
on: push: tags-ignore: - '*.*' # We don't want this to run on release paths-ignore: # Don't trigger on files that are updated by the CI - pyproject.toml - setup.py - README.rst
I have the following for the release workflow:
on: release: types: [published]
However, given the above configuration, NO workflows are triggered when I push a commit.
If I remove the tags-ignore element, then workflows trigger, but when I do a release, the “push” workflow still triggers as well (I believe because it results in a tag push).
I haven’t yet been at all able to make the paths-ignore syntax work.
Some assistance would be greatly appreciated.