Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 4

Github Action not being triggered

Solved! Go to Solution.

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?


3 Replies
Pilot Lvl 1
Message 2 of 4

Re: Github Action not being triggered

I'm facing similar problem here:

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

Copilot Lvl 3
Message 3 of 4

Re: Github Action not being triggered

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.

Copilot Lvl 3
Message 4 of 4