Skip to content

Commit bc7055f

Browse files
committed
ci: do not fetch branch on close pr event
1 parent 55a1d54 commit bc7055f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/previews-ods-ui.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ jobs:
2121
pull-requests: write
2222

2323
steps:
24-
- name: Checkout
24+
- name: Checkout branch
25+
if: github.event.action != 'closed'
2526
uses: actions/checkout@v5
2627
# Fetch the full history for the branch to be able to get the short SHA
2728
with:
2829
ref: ${{ github.head_ref }}
2930
fetch-depth: 0
3031

32+
# If the PR is closed, the branch may be deleted already, so we can't checkout the branch
33+
- name: Checkout
34+
if: github.event.action == 'closed'
35+
uses: actions/checkout@v5
36+
3137
- name: Set up kubectl
3238
uses: azure/setup-kubectl@v4
3339
with:

0 commit comments

Comments
 (0)