Skip to content

Commit dfdefd9

Browse files
authored
Merge pull request #346 from mglaman/fix-version-alias
Fix HEAD fails on branch alias for build integration jobs
2 parents fa330df + 6b35896 commit dfdefd9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/php.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,18 @@ jobs:
8989
with:
9090
version: ${{ matrix.drupal }}
9191
path: ~/drupal
92+
- name: "set the version alias for self"
93+
run: |
94+
if [ "${{ github.event_name }}" == 'pull_request' ]; then
95+
echo ::set-output name=VERSION_ALIAS::dev-"${{ github.sha }}"
96+
else
97+
echo ::set-output name=VERSION_ALIAS::dev-main
98+
fi
99+
id: branch_alias
92100
- name: "require phpstan-drupal"
93101
run: |
94102
cd ~/drupal
95-
COMPOSER_MEMORY_LIMIT=-1 composer require mglaman/phpstan-drupal "dev-${{ github.sha }} as 1.1.99" phpstan/extension-installer --with-all-dependencies
103+
COMPOSER_MEMORY_LIMIT=-1 composer require mglaman/phpstan-drupal "${{ steps.branch_alias.outputs.VERSION_ALIAS }} as 1.1.99" phpstan/extension-installer --with-all-dependencies
96104
cp $GITHUB_WORKSPACE/tests/fixtures/config/drupal-phpstan.neon phpstan.neon
97105
- name: "Test core/install.php"
98106
run: |

0 commit comments

Comments
 (0)