From 6ca977ddd513d0adc44bf7feb3d2afc61b7ce0d4 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Sat, 23 Aug 2025 17:06:30 -0700 Subject: [PATCH] fix: Use github.sha fallback for workflow_dispatch SHA resolution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When no SHA is provided in workflow_dispatch and there's no PR context, fallback to github.sha (current commit). This fixes the 'No SHA available' error for manual triggers. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/showtime-trigger.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/showtime-trigger.yml b/.github/workflows/showtime-trigger.yml index e8d0bb36502..e79dc5bce48 100644 --- a/.github/workflows/showtime-trigger.yml +++ b/.github/workflows/showtime-trigger.yml @@ -100,12 +100,10 @@ jobs: elif [[ -n "${{ github.event.pull_request.head.sha }}" ]]; then SHA="${{ github.event.pull_request.head.sha }}" echo "Using PR head SHA: $SHA" - elif [[ "${{ github.event_name }}" == "push" ]]; then - SHA="${{ github.sha }}" - echo "Using push SHA: $SHA" else - echo "❌ No SHA available from any source" - exit 1 + # Fallback to current commit SHA (works for push and workflow_dispatch) + SHA="${{ github.sha }}" + echo "Using current commit SHA: $SHA" fi # Validate SHA format (40-char hex)