mirror of
https://github.com/symfony/recipes.git
synced 2026-09-11 23:26:27 +03:00
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: Q&A
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
|
|
create-project:
|
|
name: Create-project
|
|
runs-on: Ubuntu-20.04
|
|
|
|
steps:
|
|
-
|
|
name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
coverage: "none"
|
|
php-version: "7.4"
|
|
|
|
-
|
|
name: Export configuration
|
|
continue-on-error: true
|
|
id: config
|
|
run: |
|
|
SYMFONY_ENDPOINT=https://flex.symfony.com/r/github.com/symfony/recipes/${{ github.event.number }}
|
|
echo SYMFONY_ENDPOINT=$SYMFONY_ENDPOINT >> $GITHUB_ENV
|
|
|
|
PACKAGES=$(curl -s $SYMFONY_ENDPOINT | sed -En 's/.*composer req "([^"]+)".*/\1/p')
|
|
echo PACKAGES=$PACKAGES >> $GITHUB_ENV
|
|
|
|
[[ "" != "$PACKAGES" ]]
|
|
|
|
-
|
|
name: Create-project with skeleton ^4
|
|
if: "always() && steps.config.outcome == 'success'"
|
|
run: |
|
|
composer create-project "symfony/skeleton:^4" v4
|
|
cd v4
|
|
composer require $PACKAGES
|
|
|
|
-
|
|
name: Create-project with skeleton ^5
|
|
if: "always() && steps.config.outcome == 'success'"
|
|
run: |
|
|
composer create-project "symfony/skeleton:^5" v5
|
|
cd v5
|
|
composer require $PACKAGES
|