|
1 | 1 | name: Solidity Random Beacon |
2 | 2 |
|
3 | 3 | on: |
4 | | - schedule: |
5 | | - - cron: "0 0 * * *" |
6 | | - push: |
7 | | - branches: |
8 | | - - main |
9 | | - paths: |
10 | | - - "solidity/random-beacon/**" |
11 | | - - ".github/workflows/contracts-random-beacon.yml" |
12 | | - pull_request: |
13 | 4 | # We intend to use `workflow dispatch` in two different situations/paths: |
14 | 5 | # 1. If a workflow will be manually dispatched from branch named |
15 | 6 | # `dapp-development`, workflow will deploy the contracts on the selected |
@@ -41,25 +32,14 @@ jobs: |
41 | 32 | contracts-detect-changes: |
42 | 33 | runs-on: ubuntu-latest |
43 | 34 | outputs: |
44 | | - path-filter: ${{ steps.filter.outputs.path-filter }} |
| 35 | + path-filter: ${{ steps.set-output.outputs.path-filter }} |
45 | 36 | steps: |
46 | | - - uses: actions/checkout@v3 |
47 | | - if: github.event_name == 'pull_request' |
48 | | - |
49 | | - - uses: dorny/paths-filter@v2 |
50 | | - if: github.event_name == 'pull_request' |
51 | | - id: filter |
52 | | - with: |
53 | | - filters: | |
54 | | - path-filter: |
55 | | - - './solidity/random-beacon/**' |
56 | | - - './.github/workflows/contracts-random-beacon.yml' |
| 37 | + - name: Set path-filter output |
| 38 | + id: set-output |
| 39 | + run: echo "path-filter=true" >> $GITHUB_OUTPUT |
57 | 40 |
|
58 | 41 | contracts-lint: |
59 | 42 | needs: contracts-detect-changes |
60 | | - if: | |
61 | | - github.event_name == 'push' |
62 | | - || needs.contracts-detect-changes.outputs.path-filter == 'true' |
63 | 43 | runs-on: ubuntu-latest |
64 | 44 | defaults: |
65 | 45 | run: |
|
87 | 67 |
|
88 | 68 | contracts-slither: |
89 | 69 | needs: contracts-detect-changes |
90 | | - if: | |
91 | | - github.event_name == 'push' |
92 | | - || needs.contracts-detect-changes.outputs.path-filter == 'true' |
93 | 70 | runs-on: ubuntu-latest |
94 | 71 | defaults: |
95 | 72 | run: |
@@ -131,9 +108,6 @@ jobs: |
131 | 108 |
|
132 | 109 | contracts-build-and-test: |
133 | 110 | needs: contracts-detect-changes |
134 | | - if: | |
135 | | - github.event_name != 'pull_request' |
136 | | - || needs.contracts-detect-changes.outputs.path-filter == 'true' |
137 | 111 | runs-on: ubuntu-latest |
138 | 112 | defaults: |
139 | 113 | run: |
@@ -162,9 +136,6 @@ jobs: |
162 | 136 |
|
163 | 137 | contracts-deployment-dry-run: |
164 | 138 | needs: contracts-detect-changes |
165 | | - if: | |
166 | | - github.event_name != 'pull_request' |
167 | | - || needs.contracts-detect-changes.outputs.path-filter == 'true' |
168 | 139 | runs-on: ubuntu-latest |
169 | 140 | defaults: |
170 | 141 | run: |
|
0 commit comments