KitanoB/KtxGuard

GitHub Action Loop Bug - Constant Badge Update

Closed this issue · 0 comments

Description:
We've detected a recurrent issue with our GitHub Action responsible for updating badges on our README. Instead of updating badges upon certain triggers or conditions, the action is currently in a continuous loop. This not only consumes unnecessary CI/CD resources but also clutters our commit history.

Tasks:

🕵️ Identify the Cause: Investigate the GitHub Action workflow file (*.yml) to identify any misconfigured triggers or conditions causing the loop.
⏲️ Review Triggers: Ensure that the action is set to run only when necessary (e.g., after a push to the main branch, upon a pull request merge, or when tests are run). Remove or modify any extraneous triggers.
🔗 Check Dependencies: Ensure that the GitHub Action isn't triggering itself inadvertently. For instance, if it commits changes to the main branch and is set to run on every push to the main branch, this might cause an infinite loop.
⚙️ Optimize Badge Update Logic: Ensure that the action updates the badges only when there's an actual change in the badge data, rather than updating it on every action run.
✅ Test the Fix: After making the necessary modifications, trigger the action to verify that it doesn't re-run without a valid reason.
✍️ Documentation: Update any associated developer documentation or inline comments in the workflow file to clarify the triggers and behaviors of the GitHub Action.
Acceptance Criteria:

GitHub Action updates badges only when necessary and doesn't run in an endless loop.
The commit history remains clean and isn't cluttered with redundant badge updates.
CI/CD resources are optimized and not wasted on unnecessary badge update runs.
Additional Notes:
Please ensure thorough testing after implementing the fix, as the continuous integration flow is critical to our development process. If required, consider creating a separate test branch to validate changes without affecting the main branch.