Stuck GitHub workflows for Solidity contracts #3849
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When PRs come from forks, GitHub Actions requires explicit permissions. Without pull-requests: read, the dorny/paths-filter action can't access PR information, causing the contracts-detect-changes job to hang, which blocks contracts-build-and-test.
Added permissions block to both workflows (contracts-random-beacon.yml and contracts-ecdsa.yml):
contents: read - Required to read repository contents
pull-requests: read - Required for the dorny/paths-filter action to read PR information
Improved checkout configuration for PRs:
Added fetch-depth: 0 to ensure full git history is available for path filtering
Updated
contracts-ecdsa.ymlandcontracts-random-beacon.ymlto improve path-filter output handling.Changed output assignment to use
steps.set-output.outputs.path-filterfor consistency.Enhanced error handling by adding
continue-on-error: truefor path detection steps.Consolidated logic for setting path-filter output based on event type, ensuring correct behavior for both pull request and non-PR events.