The action codes are difficult to debug because its running environment cannot be mocked locally. Therefore, the only method to see whether your code runs as expected is pushing the changes to GitHub and let GitHub Actions runners test them. Follow the steps below to debug your codes.
- Fork the action repository you want to contribute.
- Add changes to the current logic and push it to your forked repository.
- For a specific action, you can add integration tests in the GitHub Action workflow definitions. They are stored in the .github/workflows directory. Remember you need to set up your tests correctly which can be triggered by a push so that you can see it run after you have pushed the changes.
- After you have pushed the changes, you can visit the Actions page in your forked repository where you can see their full logs after it reaches the end of the run.