From fbaad1430f2dd4b854eff03fa3d63914d9352dad Mon Sep 17 00:00:00 2001 From: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com> Date: Mon, 29 Jan 2024 06:59:06 -0800 Subject: [PATCH] fix: dorny/path-filter requires checkout for pushes (#662) --- .github/workflows/motoko-counter-example.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/motoko-counter-example.yaml b/.github/workflows/motoko-counter-example.yaml index 562d7e181..4727a534c 100644 --- a/.github/workflows/motoko-counter-example.yaml +++ b/.github/workflows/motoko-counter-example.yaml @@ -17,7 +17,8 @@ jobs: outputs: sources: ${{ steps.filter.outputs.sources }} steps: - # For pull requests it's not necessary to checkout the code + - uses: actions/checkout@v4 + if: github.event_name == 'push' - uses: dorny/paths-filter@v3 id: filter with: @@ -29,7 +30,7 @@ jobs: - .github/workflows/motoko-counter-example.yaml motoko-counter-example-darwin: needs: changes - if: ${{ needs.changes.outputs.sources == 'true' }} + if: github.event_name == 'push' || needs.changes.outputs.sources == 'true' runs-on: macos-12 steps: - uses: actions/checkout@v1 @@ -43,7 +44,7 @@ jobs: popd motoko-counter-example-linux: needs: changes - if: ${{ needs.changes.outputs.sources == 'true' }} + if: github.event_name == 'push' || needs.changes.outputs.sources == 'true' runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v1