Skip to content

Conversation

@lionakhnazarov
Copy link
Contributor

@lionakhnazarov lionakhnazarov commented Dec 11, 2025

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.yml and contracts-random-beacon.yml to improve path-filter output handling.

  • Changed output assignment to use steps.set-output.outputs.path-filter for consistency.

  • Enhanced error handling by adding continue-on-error: true for 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.

- Added permissions for read access to contents and pull requests in both `contracts-ecdsa.yml` and `contracts-random-beacon.yml`.
- Updated checkout step to use `fetch-depth: 0` for full history retrieval during pull request events.
- Introduced a default path-filter step for non-PR events in `contracts-random-beacon.yml` to streamline CI processes.
@lionakhnazarov lionakhnazarov changed the title Enhance GitHub workflows for Solidity contracts Stuck GitHub workflows for Solidity contracts Dec 11, 2025
@lionakhnazarov lionakhnazarov marked this pull request as draft December 12, 2025 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant