From cf01e7497aed236ecd01f914ea0d2bebd78d14e5 Mon Sep 17 00:00:00 2001 From: jameslinnell Date: Fri, 8 Nov 2024 13:47:28 +0000 Subject: [PATCH] Set branch ref to main if branch has been deleted --- .github/workflows/on-pr-close.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-pr-close.yml b/.github/workflows/on-pr-close.yml index bcbfad05..bf63273f 100644 --- a/.github/workflows/on-pr-close.yml +++ b/.github/workflows/on-pr-close.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ env.BRANCH_NAME }} + ref: ${{ env.BRANCH_NAME || 'main' }} - uses: ./.github/actions/make/ with: command: build @@ -41,7 +41,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - ref: ${{ env.BRANCH_NAME }} + ref: ${{ env.BRANCH_NAME || 'main' }} fetch-depth: 0 - name: Remove PR workspaces uses: ./.github/actions/make/