Skip to content

Commit 5f98b98

Browse files
committed
Use github.ref_name as fallback for github.head_ref in e2e workflow
`github.head_ref` is only set on `pull_request` events; `workflow_dispatch` leaves it empty, whcih caused the `composer require` step to request an invalid "dev-" branch alias and fail.
1 parent 4fe5763 commit 5f98b98

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ jobs:
4747
env:
4848
GH_TOKEN: ${{ github.token }}
4949

50-
- name: Update the extension to "dev-${{ github.head_ref }} as ${{ steps.latest.outputs.version }}"
51-
run: composer require ${{ matrix.composer-params }} --dev "spaze/phpstan-disallowed-calls:dev-${{ github.head_ref }} as ${{ steps.latest.outputs.version }}" --with-all-dependencies
50+
- name: Update the extension to "dev-${{ github.head_ref || github.ref_name }} as ${{ steps.latest.outputs.version }}"
51+
run: composer require ${{ matrix.composer-params }} --dev "spaze/phpstan-disallowed-calls:dev-${{ github.head_ref || github.ref_name }} as ${{ steps.latest.outputs.version }}" --with-all-dependencies
5252

5353
- name: Run tests
5454
run: ${{ matrix.run }}

0 commit comments

Comments
 (0)