Skip to content

Commit f3c6050

Browse files
committed
ci: fix workflows for pull requests
1 parent d20730c commit f3c6050

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/linter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ jobs:
2222
- name: Checkout code
2323
uses: actions/checkout@v4
2424
with:
25-
ref: ${{ github.head_ref }}
25+
# Checkout the actual branch, not a specific commit
26+
ref: ${{ github.head_ref || github.ref_name }}
27+
# Fetch the full history to avoid shallow clone issues
28+
fetch-depth: 0
2629

2730
- name: Run Laravel Pint
2831
uses: aglipanci/laravel-pint-action@latest

.github/workflows/test-runner.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
matrix:
2929
os: [ ubuntu-latest ]
3030
php: [ 8.2, 8.3, 8.4 ]
31-
dependency-version: [ prefer-lowest, prefer-stable ]
31+
dependency-version: [ prefer-stable ]
3232

3333
name: ${{ matrix.os }} / PHP ${{ matrix.php }} / ${{ matrix.dependency-version }}
3434

@@ -41,7 +41,7 @@ jobs:
4141
- name: Checkout code
4242
uses: actions/checkout@v4
4343
with:
44-
ref: ${{ github.head_ref }}
44+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
4545

4646
- name: Validate composer.json and composer.lock
4747
run: composer validate --strict

0 commit comments

Comments
 (0)