mirror of
https://github.com/apache/superset.git
synced 2026-05-24 17:25:20 +00:00
fix: Add SHA handling for push events in showtime workflow
Use github.sha for push events since they don't have pull_request context. This fixes the 'No SHA available' error when the workflow runs on push. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
7
.github/workflows/showtime-trigger.yml
vendored
7
.github/workflows/showtime-trigger.yml
vendored
@@ -112,15 +112,18 @@ jobs:
|
||||
id: sha
|
||||
if: steps.check.outputs.build_needed == 'true'
|
||||
run: |
|
||||
# Simple SHA handling - use input or default to PR head
|
||||
# SHA handling for different event types
|
||||
if [[ -n "${{ github.event.inputs.sha }}" ]]; then
|
||||
SHA="${{ github.event.inputs.sha }}"
|
||||
echo "Using override SHA: $SHA"
|
||||
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 PR head or inputs"
|
||||
echo "❌ No SHA available from any source"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user