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 + });