From 4090e126c9471e6a48e9e5eb6fa88d0de22c5be3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:02:25 +0000 Subject: [PATCH 1/3] Initial plan From 019bde171ab1be77a76e441d58f1db6cab6a2588 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:05:18 +0000 Subject: [PATCH 2/3] fix: create tag when no changes and tag merge commit when PR is merged Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/sync-actions.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-actions.yml b/.github/workflows/sync-actions.yml index 1a5cf73..24e84a5 100644 --- a/.github/workflows/sync-actions.yml +++ b/.github/workflows/sync-actions.yml @@ -329,10 +329,20 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create tag - if: steps.resolve-ref.outputs.should_create_tag == 'true' && steps.create-pr.outputs.changed == 'true' + if: steps.resolve-ref.outputs.should_create_tag == 'true' run: | echo "::group::Creating Tag" cd gh-aw-actions + + # When a PR was created and merged, we need to pull the merge commit from main + # because the working directory is still on the sync branch. + if [[ "${{ steps.create-pr.outputs.changed }}" == "true" ]]; then + echo "PR was merged — fetching main to tag the merge commit..." + git fetch origin main + git checkout main + git reset --hard origin/main + fi + TAG="${{ steps.resolve-ref.outputs.raw_ref }}" echo "Creating tag: $TAG" From 51b73c5155be51bddef472876d57d66e4b423892 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Mar 2026 15:06:22 +0000 Subject: [PATCH 3/3] fix: use git checkout -B to robustly reset to origin/main before tagging Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/sync-actions.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/sync-actions.yml b/.github/workflows/sync-actions.yml index 24e84a5..15edc5c 100644 --- a/.github/workflows/sync-actions.yml +++ b/.github/workflows/sync-actions.yml @@ -339,8 +339,7 @@ jobs: if [[ "${{ steps.create-pr.outputs.changed }}" == "true" ]]; then echo "PR was merged — fetching main to tag the merge commit..." git fetch origin main - git checkout main - git reset --hard origin/main + git checkout -B main origin/main fi TAG="${{ steps.resolve-ref.outputs.raw_ref }}"