Update documentation on Github Actions page

There are some information which are not valid for time being therefore it would be nice to have updated documentation. I have tried to use paths-ignore keyword, yet it did not work and also Github did not make auto suggestion for that keyword. I thought that documentation  is outdated hence I wanted to open the situation here.

Here is the link where documentation explains how to ignore changes on given part in order to do not trigger CI.

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#example-ignoring-paths

Hi mrturkmen06,

I tested the paths-ignore syntax, and it can work as expectation, when the changed file name match the pattern in paths-ignore, the workflow will not be triggered.
Can you share the YAML file of your workflow that has set the paths-ignore syntax, so that we can analyze the root cause?
In addition, there are several suggestions and notes as reference:

  1. You only can use one of paths and paths-ignore for a single event.

Invalid_Workflow_File.PNG

  1. If you want set some paths filters that can include some paths and exclude some paths for a single event, you can use the ! character in paths syntax.

example.PNG

  1. A matching negative pattern (prefixed with !) after a positive match will exclude the path, and a matching positive pattern after a negative match will include the path again.

Hi, BrightRan

https://github.com/nakamasato/github-actions-practice/blob/master/.github/workflows/auto-approve.yml

I want to trigger the workflow there’s no change outside the specified directory (automatic-approval in this case). More specifically what i want to implement is the following:

  • If there’s changes under automatic-approval and there’s changes under other directory too, not trigger.

  • If there’s changes under automatic-approval and there’s NO changes under other directory too, trigger.

  • If there’s NO changes under automatic-approval and there’s changes under other directory too, not trigger.

  • If there’s changes under automatic-approval and there’s NO changes under other directory too, not trigger.

I tried to use path-ignore and  negative  expression. 

github-actions.png

But it didn’t work as expected and the workflow is triggered by any pull request… Could you give me any advice?

It is impossible to implement the your request, once there are changes under “automatic-approval”, the workflow will always be triggered, it does not care about whether there are changes outside “automatic-approval” or not.

Okay, thank you for your reply!

what if we want to ignore a floder with “.”

example: " .github/workflows"