From 354c9b0751aaeb6deb6047327c220518ffd80239 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 11 Oct 2024 09:55:14 -0400 Subject: [PATCH] Update sync-release.yml --- .github/workflows/sync-release.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/sync-release.yml b/.github/workflows/sync-release.yml index 8163e5f1..d78f5666 100644 --- a/.github/workflows/sync-release.yml +++ b/.github/workflows/sync-release.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 with: - fetch-depth: 0 # Fetch the full history + fetch-depth: 0 # Fetch the full history - name: Set up Git run: | @@ -36,7 +36,7 @@ jobs: exit 1 - name: Reset release branch to main - if: steps.diff-check.outcome == 'success' # Only proceed if no differences found + if: steps.diff-check.outcome == 'success' # Only proceed if no differences found run: | git reset --hard origin/main @@ -45,14 +45,13 @@ jobs: run: git push origin release --force - name: Notify via GitHub Issue if differences found - if: failure() # This runs if there were differences found and the job failed + if: failure() # This runs if there were differences found and the job failed uses: actions/github-script@v6 with: script: | - const github = require('@actions/github'); await github.issues.create({ owner: context.repo.owner, repo: context.repo.repo, title: 'Sync Failure: Differences found between main and release', body: 'There are differences between `main` and `release` branches that prevented synchronization. Please review the branches and resolve manually.' - }); \ No newline at end of file + });