Skip to content

Conversation

@ryanaidilp
Copy link
Contributor

Summary

This PR fixes critical issues with the GitHub Actions workflows that were causing deployment failures and back-merge conflicts in the Git Flow process.

Problems Addressed

1. Deployment Trigger Issue

  • Problem: The deploy.yml workflow wasn't triggering automatically when tags were created by release-automation.yml
  • Solution:
    • Changed from attempting to manually trigger deployment to monitoring tag creation
    • Added workflow_dispatch option as a backup deployment method
    • The workflow now supports both automatic tag triggers and manual deployment

2. Back-merge Conflicts

  • Problem: Back-merge PRs to develop frequently had conflicts due to version bump PRs already existing
  • Solution:
    • Implemented intelligent conflict resolution that compares versions and keeps the higher one
    • Added checks to prevent creating duplicate version bump PRs
    • Changed back-merge strategy to create branches from main first, then merge develop changes

3. Duplicate Workflows

  • Problem: The backmerge-to-develop.yml was redundant with functionality in release-automation.yml
  • Solution: Removed the duplicate workflow file

4. Version Bump Conflicts

  • Problem: Multiple version bump PRs could be created, causing conflicts
  • Solution:
    • Added checks for existing version bump PRs before creating new ones
    • Added version comparison to skip updates if develop already has a higher version
    • Improved conflict resolution for package.json and CHANGELOG.md

Changes Made

Modified Workflows

  1. release-automation.yml

    • Replaced manual deployment trigger with tag monitoring
    • Implemented intelligent back-merge strategy
    • Added version comparison for conflict resolution
    • Create back-merge branches from main instead of develop
  2. release-branch-creation.yml

    • Added checks for existing version bump PRs
    • Added version comparison before updating
    • Skip version bump if develop already has target or higher version
  3. deploy.yml

    • Added workflow_dispatch trigger for manual deployment
    • Support both tag-based and manual deployment
  4. backmerge-to-develop.yml

    • Removed (duplicate functionality)

Testing Recommendations

  1. Create a release branch and verify:

    • Changelog PR is created correctly
    • Version bump PR is created only if needed
  2. Merge release to main and verify:

    • Tag is created automatically
    • Deployment workflow triggers
    • Back-merge PR is created without conflicts
  3. Test manual deployment:

    • Use workflow_dispatch to deploy a specific tag

Impact

These changes ensure a smooth Git Flow process with automatic conflict prevention, reliable deployments, and reduced manual intervention.

- Fix deployment trigger issue by monitoring tag creation instead of manual triggering
- Add workflow_dispatch option to deploy.yml as backup deployment method
- Implement intelligent back-merge strategy to prevent conflicts
- Add version comparison logic to avoid duplicate version bumps
- Remove duplicate backmerge-to-develop.yml workflow
- Improve conflict resolution for package.json and CHANGELOG.md
- Add checks to prevent creating duplicate version bump PRs
- Create back-merge branches from main instead of develop to reduce conflicts

This ensures smooth Git Flow operations with automatic conflict prevention
@ryanaidilp ryanaidilp self-assigned this Sep 14, 2025
- Move all secrets to env blocks in each step
- Replace direct secret usage in run blocks with environment variables
- Fix GitHub Actions context usage patterns
- Maintain proper variable expansion in SSH heredocs
- Follow GitHub Actions security best practices
@ryanaidilp ryanaidilp merged commit 5fb5946 into develop Sep 14, 2025
@ryanaidilp ryanaidilp deleted the feature/fix-github-workflows-conflicts branch September 14, 2025 12:56
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.

2 participants