Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 5, 2025

The frontend build workflow was failing with the error:

remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: - Changes must be made through a pull request.
remote: - You're not authorized to push to this branch.
error: failed to push some refs to 'https://github.com/codecentric/llm-eval'

Root Cause

The issue occurred because:

  1. The frontend.yaml workflow triggers on push to main branch
  2. It calls frontend-build-and-push.yaml as a workflow_call
  3. The build workflow runs semantic-release when conditions are met
  4. Semantic-release was configured with @semantic-release/git plugin that commits and pushes changes back to the repository
  5. The main branch is protected and doesn't allow direct pushes, causing the workflow to fail

Solution

Removed the @semantic-release/git plugin from /frontend/.releaserc.json while preserving all other semantic-release functionality:

  • ✅ Commit analysis for version bumps
  • ✅ Release notes generation
  • ✅ Changelog generation
  • ✅ GitHub releases
  • ❌ Git commits/pushes (removed to fix protected branch error)

This minimal change (removing 7 lines) solves the protected branch push error while maintaining the essential semantic-release features. The workflow will now complete successfully without attempting to push commits back to the protected main branch.

Testing

  • Semantic-release dry-run passes without errors
  • Frontend linting and building work correctly
  • Configuration loads all required plugins except the removed git plugin
  • Simulated CI environment confirms semantic-release works properly

Fixes #45.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…push errors

Co-authored-by: darthkali <46423967+darthkali@users.noreply.github.com>
Copilot AI changed the title [WIP] frontend-build-and-push.yaml error fix: remove @semantic-release/git plugin to prevent protected branch push errors Aug 5, 2025
Copilot AI requested a review from darthkali August 5, 2025 16:58
@darthkali darthkali marked this pull request as ready for review August 5, 2025 17:00
@darthkali darthkali merged commit 4d82eb0 into main Aug 5, 2025
8 checks passed
@github-actions
Copy link

github-actions bot commented Aug 5, 2025

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontend-build-and-push.yaml error

2 participants