From 4abf322a1efd66e88cf42afad2b39ff90552c166 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 2 Jun 2026 17:04:58 +0000 Subject: [PATCH] Deduplicate release permission warning in workflow --- .github/workflows/scheduled-build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scheduled-build.yml b/.github/workflows/scheduled-build.yml index 61a4309..6d691a3 100644 --- a/.github/workflows/scheduled-build.yml +++ b/.github/workflows/scheduled-build.yml @@ -153,10 +153,9 @@ jobs: set -e if [ "${GH_RELEASE_EXIT_CODE}" -ne 0 ]; then - if [ "${GH_RELEASE_EXIT_CODE}" -eq 4 ]; then - echo "::warning::Skipping GitHub release creation for ${{ steps.release.outputs.next_tag }} because the workflow token cannot create releases." - elif echo "${GH_RELEASE_OUTPUT}" | grep -Eq "HTTP 403|Resource not accessible by integration"; then - echo "::warning::Skipping GitHub release creation for ${{ steps.release.outputs.next_tag }} because the workflow token cannot create releases." + RELEASE_PERMISSION_WARNING="Skipping GitHub release creation for ${{ steps.release.outputs.next_tag }} because the workflow token cannot create releases." + if [ "${GH_RELEASE_EXIT_CODE}" -eq 4 ] || (echo "${GH_RELEASE_OUTPUT}" | grep -Eq "HTTP 403|Resource not accessible by integration"); then + echo "::warning::${RELEASE_PERMISSION_WARNING}" else echo "::error::${GH_RELEASE_OUTPUT}" exit ${GH_RELEASE_EXIT_CODE}