Github Action not being triggered

I defined a simple workflow which looks like this:

name: Build & Test

      - 'src/Sting.Measurements/**'


    runs-on: ubuntu-latest

    - uses: actions/checkout@v1
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v1
        dotnet-version: 2.2.108
    - name: Build Sting.Application
      run: dotnet build --configuration Release src/Sting.Measurements/Sting.Application
    - name: Build Sting.Core
      run: dotnet build --configuration Release src/Sting.Measurements/Sting.Core
    - name: Build Sting.Devices
      run: dotnet build --configuration Release src/Sting.Measurements/Sting.Devices
    - name: Build Sting.Persistence
      run: dotnet build --configuration Release src/Sting.Measurements/Sting.Persistence

But when I push to the corresponding repo/directory, the action is not triggered. What am I missing?



I’m facing similar problem here:

I suspect GitHub Actions currently does not look into subdirectories recursively when given path/** pattern.


Update: The action now seems to actually run as intended what I changed is: (Update 2: no it does not)

- 'src/Sting.Measurements/\*'

So only one asterisk I suppose. This was actually how my workflow originally looked but no action was triggered maybe because it contained a syntax mistake with the initial commit (which I fixed but still no action was triggered). Only after deleting and recreating the workflow it seems to work now.

I can’t really tell what exactly the problem was since a lot of confusing stuff is happening. For instance dependabot triggered the action before I changed anything with a pull request which changed a file in _src/Sting.WebApp/… _which should not trigger the action…

Update 2: So the part where the action actually worked was an anomaly too. I created a new branch to verify the action is actually working reliably and it still does not work. I was able to reproduce what SamChou19815 said, the paths directive seems to not look for changes recursively.

See for futher info.

You missed specifying the branch which should trigger the build

Sometimes GitHub Actions does not enter the “queued” state until 5 minutes after pushing. This can be misleading. I think it should move into queued state immediately, even if it doesn’t start running anything until later. This would improve UX and ease expectations in some cases.