Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Decouples the package update workflow from the release publishing workflow to allow independent execution timing.

Changes

  • Renamed workflow: update-packages.ymlupdate.yml
  • Simplified update.yml: Removed release PR creation and auto-merge steps after pushing updates to main
  • Added cron trigger to publish.yml: Scheduled to run Mondays at 01:00 UTC, 1 hour after update.yml (00:00 UTC)

Workflow Behavior

Before: Single workflow that updated packages, created release PRs, and auto-merged them in one execution.

After:

  • update.yml only pushes package updates to main
  • publish.yml runs 1 hour later via cron to handle releases (also triggered on push to main)
Original prompt

.github/workflows/update-packages.yml

Rename it to update.yml

Delete all step after the step pushing changes to main

.github/workflows/publish.yml

This workflow will trigger by cron

After update.yml workflow 1 hour


💡 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.

Copilot AI changed the title [WIP] Rename update-packages.yml to update.yml Refactor workflow scheduling: separate update and publish workflows Nov 6, 2025
Copilot AI requested a review from hckhanh November 6, 2025 06:57
Copilot finished work on behalf of hckhanh November 6, 2025 06:57
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@hckhanh hckhanh marked this pull request as ready for review November 6, 2025 07:05
Copilot AI review requested due to automatic review settings November 6, 2025 07:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the CI/CD workflow to separate update checking from publishing. The update workflow now directly commits changes to main instead of creating a release PR, while the publish workflow is scheduled to run 1 hour after updates complete.

Key changes:

  • Removed the PR-based release flow from update.yml in favor of direct commits to main
  • Changed publish.yml trigger from push-to-main to a scheduled cron job

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/update.yml Removed the changesets PR creation and auto-merge steps; workflow now commits directly to main
.github/workflows/publish.yml Changed trigger from push on main branch to weekly cron schedule (1 hour after update.yml)
Comments suppressed due to low confidence (1)

.github/workflows/update.yml:59

  • Direct commits to the main branch bypass PR-based code review and CI checks that would normally run on pull requests. This could introduce breaking changes or errors without proper validation. Consider keeping the PR workflow or ensuring comprehensive CI checks run before the commit, especially given that the 'Fix' step runs code transformations that could potentially fail.

Comment on lines +5 to +7
schedule:
# Run weekly on Monday at 01:00 UTC (1 hour after update.yml)
- cron: '0 1 * * 1'
Copy link

Copilot AI Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states this runs '1 hour after update.yml', but this assumes update.yml always completes within 1 hour. If the update workflow takes longer than 1 hour or fails, the publish workflow will run on stale code. Consider using workflow_run trigger with 'workflows: [Update]' and 'types: [completed]' to ensure publish only runs after update successfully completes, or add explicit dependency checking.

Copilot uses AI. Check for mistakes.
@hckhanh hckhanh merged commit 744e916 into main Nov 6, 2025
12 checks passed
@hckhanh hckhanh deleted the copilot/rename-update-packages-file branch November 6, 2025 07:08
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