Skip to content

Commit 51824e8

Browse files
author
ankitcodes4u
committed
fix: failing github actions
1 parent 5e1f651 commit 51824e8

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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)