Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions .github/workflows/contracts-ecdsa.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Solidity ECDSA

permissions:
contents: read
pull-requests: read

on:
schedule:
- cron: "0 0 * * *"
Expand Down Expand Up @@ -41,20 +45,41 @@ jobs:
contracts-detect-changes:
runs-on: ubuntu-latest
outputs:
path-filter: ${{ steps.filter.outputs.path-filter }}
path-filter: ${{ steps.set-output.outputs.path-filter }}
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
if: github.event_name == 'pull_request'
with:
fetch-depth: 0

- uses: dorny/paths-filter@v2
- name: Detect path changes
uses: dorny/paths-filter@v2
if: github.event_name == 'pull_request'
id: filter
continue-on-error: true
with:
filters: |
path-filter:
- './solidity/ecdsa/**'
- './.github/workflows/contracts-ecdsa.yml'

- name: Set path-filter output
id: set-output
run: |
if [ "${{ github.event_name }}" != "pull_request" ]; then
# For non-PR events, always set to true
echo "path-filter=true" >> $GITHUB_OUTPUT
else
# For PRs, try to use filter output, default to false if not available
FILTER_OUTPUT="${{ steps.filter.outputs.path-filter }}"
if [ -n "$FILTER_OUTPUT" ] && [ "$FILTER_OUTPUT" != "" ] && [ "$FILTER_OUTPUT" != "null" ]; then
echo "path-filter=$FILTER_OUTPUT" >> $GITHUB_OUTPUT
else
echo "path-filter=false" >> $GITHUB_OUTPUT
fi
fi

contracts-lint:
needs: contracts-detect-changes
if: |
Expand Down
31 changes: 28 additions & 3 deletions .github/workflows/contracts-random-beacon.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Solidity Random Beacon

permissions:
contents: read
pull-requests: read

on:
schedule:
- cron: "0 0 * * *"
Expand Down Expand Up @@ -41,20 +45,41 @@ jobs:
contracts-detect-changes:
runs-on: ubuntu-latest
outputs:
path-filter: ${{ steps.filter.outputs.path-filter }}
path-filter: ${{ steps.set-output.outputs.path-filter }}
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
if: github.event_name == 'pull_request'
with:
fetch-depth: 0

- uses: dorny/paths-filter@v2
- name: Detect path changes
uses: dorny/paths-filter@v2
if: github.event_name == 'pull_request'
id: filter
continue-on-error: true
with:
filters: |
path-filter:
- './solidity/random-beacon/**'
- './.github/workflows/contracts-random-beacon.yml'

- name: Set path-filter output
id: set-output
run: |
if [ "${{ github.event_name }}" != "pull_request" ]; then
# For non-PR events, always set to true
echo "path-filter=true" >> $GITHUB_OUTPUT
else
# For PRs, try to use filter output, default to false if not available
FILTER_OUTPUT="${{ steps.filter.outputs.path-filter }}"
if [ -n "$FILTER_OUTPUT" ] && [ "$FILTER_OUTPUT" != "" ] && [ "$FILTER_OUTPUT" != "null" ]; then
echo "path-filter=$FILTER_OUTPUT" >> $GITHUB_OUTPUT
else
echo "path-filter=false" >> $GITHUB_OUTPUT
fi
fi

contracts-lint:
needs: contracts-detect-changes
if: |
Expand Down