Fix downgrade action #1844
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
bare_run: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php_version: ['7.2', '7.3', '7.4', '8.0'] | |
steps: | |
- uses: actions/checkout@v3 | |
- id: check_tag | |
run: | | |
MESSAGE=$(git tag -l --format='%(contents)' $(git describe --tags $(git rev-list --tags --max-count=1))) | |
if echo $MESSAGE | grep -q "PHP 7.2 downgraded"; then | |
echo "NEEDED_DOWNGRADE=1" >> $GITHUB_ENV | |
else | |
echo "NEEDED_DOWNGRADE=0" >> $GITHUB_ENV | |
fi | |
- name: Setup PHP And Run Monorepo | |
if: env.NEEDED_DOWNGRADE == '1' | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_version }} | |
coverage: none | |
run: php bin/monorepo-builder list --ansi |