Skip to content

Commit

Permalink
chore: required status workflows use dorny/paths-filter (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswanson-dfinity authored Jan 29, 2024
1 parent 9b7f251 commit e4a244d
Show file tree
Hide file tree
Showing 16 changed files with 192 additions and 200 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/motoko-echo-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/echo/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-echo-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/echo/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-echo-example.yaml
motoko-echo-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-echo-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-echo-skip.yaml

This file was deleted.

29 changes: 24 additions & 5 deletions .github/workflows/motoko-factorial-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/factorial/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-factorial-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/factorial/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-factorial-example.yaml
motoko-factorial-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-factorial-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-factorial-skip.yaml

This file was deleted.

29 changes: 24 additions & 5 deletions .github/workflows/motoko-hello-world-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/hello-world/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-hello-world-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/hello-world/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-hello-world-example.yaml
motoko-hello-world-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-hello-world-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-hello-world-skip.yaml

This file was deleted.

29 changes: 24 additions & 5 deletions .github/workflows/motoko-phone-book-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/phone-book/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-phone-book-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/phone-book/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-phone-book-example.yaml
motoko-phone-book-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-phone-book-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-phone-book-skip.yaml

This file was deleted.

29 changes: 24 additions & 5 deletions .github/workflows/motoko-pub-sub-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/pub-sub/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-pub-sub-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/pub-sub/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-pub-sub-example.yaml
motoko-pub-sub-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-pub-sub-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-pub-sub-skip.yaml

This file was deleted.

29 changes: 24 additions & 5 deletions .github/workflows/motoko-quicksort-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/quicksort/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-quicksort-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/quicksort/**
- .github/workflows/provision-darwin.sh
- .github/workflows/provision-linux.sh
- .github/workflows/motoko-quicksort-example.yaml
motoko-quicksort-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-quicksort-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
Loading

0 comments on commit e4a244d

Please sign in to comment.