Skip to content

Commit 42b0bb0

Browse files
committed
use local ci branch
1 parent b2aa417 commit 42b0bb0

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,17 @@ jobs:
169169

170170
- name: Checkout
171171
uses: actions/checkout@v4
172+
with:
173+
fetch-depth: 0
174+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
175+
176+
- name: Use local branch
177+
shell: bash
178+
run: |
179+
LOCAL_BRANCH_NAME=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.head_ref }}" || echo "${{ github.ref_name }}")
180+
git branch -D $LOCAL_BRANCH_NAME 2>/dev/null || true
181+
git branch $LOCAL_BRANCH_NAME HEAD
182+
git checkout $LOCAL_BRANCH_NAME
172183
173184
- name: Install PHP with extensions
174185
uses: shivammathur/setup-php@v2

0 commit comments

Comments
 (0)