Skip to content

Commit 7df2949

Browse files
committed
remove push event references since redundant with PR synchronization
1 parent fde34cf commit 7df2949

File tree

1 file changed

+16
-29
lines changed

1 file changed

+16
-29
lines changed

.github/workflows/deploy-to-control-plane-review-app.yml

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
deploy:
2727
if: |
2828
(github.event_name == 'pull_request') ||
29-
(github.event_name == 'push') ||
3029
(github.event_name == 'workflow_dispatch') ||
3130
(github.event_name == 'issue_comment' &&
3231
github.event.issue.pull_request &&
@@ -41,34 +40,22 @@ jobs:
4140
env:
4241
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4342
run: |
44-
# For push events, try to find associated PR first
45-
if [[ "${{ github.event_name }}" == "push" ]]; then
46-
PR_DATA=$(gh pr list --head "${{ github.ref_name }}" --json number,headRefName,headRefOid --jq '.[0]')
47-
if [[ -n "$PR_DATA" ]]; then
48-
PR_NUMBER=$(echo "$PR_DATA" | jq -r .number)
49-
else
50-
echo "No PR found for branch ${{ github.ref_name }}, skipping deployment"
51-
echo "DO_DEPLOY=false" >> $GITHUB_ENV
52-
exit 0
53-
fi
54-
else
55-
# Get PR number based on event type
56-
case "${{ github.event_name }}" in
57-
"workflow_dispatch")
58-
PR_NUMBER="${{ github.event.inputs.pr_number }}"
59-
;;
60-
"issue_comment")
61-
PR_NUMBER="${{ github.event.issue.number }}"
62-
;;
63-
"pull_request")
64-
PR_NUMBER="${{ github.event.pull_request.number }}"
65-
;;
66-
*)
67-
echo "Error: Unsupported event type ${{ github.event_name }}"
68-
exit 1
69-
;;
70-
esac
71-
fi
43+
# Get PR number based on event type
44+
case "${{ github.event_name }}" in
45+
"workflow_dispatch")
46+
PR_NUMBER="${{ github.event.inputs.pr_number }}"
47+
;;
48+
"issue_comment")
49+
PR_NUMBER="${{ github.event.issue.number }}"
50+
;;
51+
"pull_request")
52+
PR_NUMBER="${{ github.event.pull_request.number }}"
53+
;;
54+
*)
55+
echo "Error: Unsupported event type ${{ github.event_name }}"
56+
exit 1
57+
;;
58+
esac
7259
7360
if [[ -z "$PR_NUMBER" ]]; then
7461
echo "Error: Could not determine PR number"

0 commit comments

Comments
 (0)