Skip to content

Commit

Permalink
chore: use dorny/path-filter for required status - motoko-calc (#650)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity authored Jan 29, 2024
1 parent fbaad14 commit 9b7f251
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 25 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/motoko-calc-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,33 @@ on:
branches:
- master
pull_request:
paths:
- motoko/calc/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-calc-example.yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
# Set job outputs to values from filter step
outputs:
sources: ${{ steps.filter.outputs.sources }}
steps:
- uses: actions/checkout@v4
if: github.event_name == 'push'
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
sources:
- motoko/calc/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-calc-example.yaml
motoko-calc-example-darwin:
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.sources == 'true'
runs-on: macos-12
steps:
- uses: actions/checkout@v1
Expand All @@ -26,6 +43,8 @@ jobs:
make test
popd
motoko-calc-example-linux:
needs: changes
if: github.event_name == 'push' || needs.changes.outputs.sources == 'true'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/motoko-calc-skip.yaml

This file was deleted.

0 comments on commit 9b7f251

Please sign in to comment.