Fix workflow permissions and allow testing on non-main branches#28
Fix workflow permissions and allow testing on non-main branches#28
Conversation
Co-authored-by: phalt <490685+phalt@users.noreply.github.com>
Co-authored-by: phalt <490685+phalt@users.noreply.github.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
=======================================
Coverage 99.62% 99.62%
=======================================
Files 30 30
Lines 804 804
Branches 72 72
=======================================
Hits 801 801
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@copilot It would appear that this job isn't working as expected when I run it on that branch: https://github.com/phalt/cicerone/actions/runs/20486246677 |
Co-authored-by: phalt <490685+phalt@users.noreply.github.com>
Fixed in commit a66483c. The workflow now only commits/pushes when running on the main branch. When triggered on PR branches, it will run the tests but skip the commit step, allowing you to test the workflow without failures. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The
test-openapi-directoryworkflow from PR #26 fails when pushing compatibility badge updates because the main branch is protected andGITHUB_TOKENcannot bypass branch protection. Additionally, the workflow was failing when manually triggered on PR branches because it attempted to commit and push to those branches.Changes
PAT_TOKENsecret instead ofGITHUB_TOKENif: github.ref == 'refs/heads/main'condition to commit step to only push badge data when running on main branchBehavior
Setup Required
Create a classic PAT with
reposcope and add as repository secretPAT_TOKEN:repoPAT_TOKENThe workflow can now be tested on any branch. When running on main, it will commit and push badge data once the secret is configured.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.