Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Pilot Lvl 1
Message 1 of 3

workflow with "on: push" triggers on release?

Solved! Go to Solution.

I have a workflow setup which triggers when I push files to the path "wiki/**" to then update the wiki of the repository.

But I now created a release and all of a sudden did this action get triggered by this.

 

Do releases now count as pushes or is this an unintentional behaviour or perhaps a visual bug?

I don't believe last option as it shows as a separate action in the Actions-tab with the same commit hash:

actions.png

 

The "on" part is set up as follows:

on:
  push:
    paths:
      - 'wiki/**'

If that is actually an intended behaviour, could someone give me a solution to make this ignore releases?

2 Replies
Solution
Pilot Lvl 1
Message 2 of 3

Re: workflow with "on: push" triggers on release?

A release triggers `on: push` because it pushes a tag. I think you can ignore pushes to tags and just have the workflow triggered on pushes to branches with this filter.

 

on:
  push:
    branches:
      - '**'
Highlighted
Pilot Lvl 1
Message 3 of 3

Re: workflow with "on: push" triggers on release?

Thanks.

 

I found a similar solution.

GitHub offers "tags-ignore" to ignore specific tags. So by using the snipped below was I able to make the action ignore all releases.

on:
  push:
    paths:
      - 'wiki/**'
    tags-ignore:
      - '**' # Just ignore all tags.