Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github: Fix chart push on forks #25274

Merged
merged 1 commit into from May 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/push-chart-ci.yaml
Expand Up @@ -48,7 +48,12 @@ jobs:
echo ref="${{ inputs.checkout_ref }}" >> $GITHUB_OUTPUT
echo sha="${{ inputs.checkout_ref }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "workflow_run" ]]; then
echo ref="${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
if [[ "${{ github.event.workflow_run.head_repository.fork }}" == "true" ]]; then
# use the SHA on forks since the head_branch won't exist in the upstream repository
echo ref="${{ github.event.workflow_run.head_sha }}" >> $GITHUB_OUTPUT
else
echo ref="${{ github.event.workflow_run.head_branch }}" >> $GITHUB_OUTPUT
fi
echo sha="${{ github.event.workflow_run.head_sha }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" ]]; then
echo ref="${{ github.ref }}" >> $GITHUB_OUTPUT
Expand Down