Github workflow dorny-filter changes succeeds on branch push, but fails on PR merge

Viewed 15

I am trying to detect changes in github workflow using dorny filter:

name: Deployment

on:
  push:
    branches: 
      - main
      - release
        
jobs:
  changes:
    name: Detect changes
    runs-on: ubuntu-latest
    outputs:
      clouds-provider: ${{ steps.filter.outputs.clouds-provider }}
    steps:
      - uses: actions/checkout@v2
      - uses: dorny/paths-filter@v2
        id: filter
        with:
          filters: |
            clouds-provider:
              - 'aws/**'
              - 'azure/**'
              - 'gcp/**'

When I push aws/azure/gcp changes directly to the branch it works great: changes.output.clouds-provider = true

However using the same changes, when I try PR merge it will fail to recognize the changes: changes.output.clouds-provider = false, but it should be true.

0 Answers
Related