Skip to content

Commit f468aad

Browse files
committed
[TASK] Use simplier and working checkout ref determination
With the introduction of non-main branch scheduled workflow execution a adjusted checkout part in the `ci.yml` workflow file has been added to allow to define which branch should be checked out. That breaks pipeline execution for pull-requests opened from repository forks. This change replaces the old detection with a more simplified implementation, only setting the custom ref in case of github workflow_dispatch event execution using `''` as fallback which allows custom branch selection for workflow dispatching while keeping default repostiory and branch checkout intact. Releases: main, 8, 7
1 parent fa0c812 commit f468aad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ jobs:
1414
matrix:
1515
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
1616
steps:
17-
- name: Checkout
17+
18+
- name: Checkout ${{ github.event_name == 'workflow_dispatch' && github.head_ref || '' }}
1819
uses: actions/checkout@v4
20+
with:
21+
ref: ${{ github.event_name == 'workflow_dispatch' && github.head_ref || '' }}
1922

2023
- name: Composer install
2124
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s composerUpdate

0 commit comments

Comments
 (0)