Skip to content

Commit 2cde446

Browse files
Move create-project from travis to gha
1 parent de32a6e commit 2cde446

File tree

2 files changed

+51
-28
lines changed

2 files changed

+51
-28
lines changed

.github/workflows/create-project.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Q&A
2+
3+
on:
4+
pull_request:
5+
6+
defaults:
7+
run:
8+
shell: bash
9+
10+
jobs:
11+
12+
create-project:
13+
name: Create-project
14+
runs-on: Ubuntu-20.04
15+
16+
steps:
17+
-
18+
name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
coverage: "none"
22+
php-version: "7.4"
23+
24+
-
25+
name: Export configuration
26+
continue-on-error: true
27+
id: config
28+
run: |
29+
SYMFONY_ENDPOINT=https://symfony.sh/r/github.com/symfony/recipes/${{ github.event.number }}
30+
echo SYMFONY_ENDPOINT=$SYMFONY_ENDPOINT >> $GITHUB_ENV
31+
32+
PACKAGES=$(curl -s $SYMFONY_ENDPOINT | sed -En 's/.*composer req "([^"]+)".*/\1/p')
33+
echo PACKAGES=$PACKAGES >> $GITHUB_ENV
34+
35+
[[ "" != "$PACKAGES" ]]
36+
37+
-
38+
name: Create-project with skeleton ^4
39+
if: "always() && steps.config.outcome == 'success'"
40+
run: |
41+
composer create-project "symfony/skeleton:^4" v4
42+
cd v4
43+
composer require $PACKAGES
44+
45+
-
46+
name: Create-project with skeleton ^5
47+
if: "always() && steps.config.outcome == 'success'"
48+
run: |
49+
composer create-project "symfony/skeleton:^5" v5
50+
cd v5
51+
composer require $PACKAGES

.travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)