Skip to content

Commit e039ca2

Browse files
[Deploy] Add parameter for sample data in deploy script
1 parent 028f4c3 commit e039ca2

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/deploy-demo-oro.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ jobs:
2727
(needs.tests.result == 'success' || needs.tests.result == 'skipped')
2828
uses: ./.github/workflows/deploy-int.yml
2929
with:
30-
version: ${{ github.ref_name }}
30+
version: 2.0.x
3131
last_published_version: 2.0.0
3232
back_version_is_tag: false
3333
front_version_is_tag: false
34+
add_sample_data: false
3435
secrets:
3536
AWS_DEPLOY_KEY: ${{ secrets.AWS_DEPLOY_KEY }}
3637
AWS_HOSTNAME: ${{ secrets.AWS_HOSTNAME_DEMO_ORO }}

.github/workflows/deploy-int.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: false
2323
default: false
2424
type: boolean
25+
add_sample_data:
26+
description: "Install sample data"
27+
required: false
28+
default: true
29+
type: boolean
2530
secrets:
2631
AWS_DEPLOY_KEY:
2732
required: true
@@ -51,6 +56,7 @@ jobs:
5156
back_branch: ${{ inputs.back_version_is_tag == true && format('tags/{0}', inputs.version) || format('origin/{0}', inputs.version) }}
5257
front_branch: ${{ inputs.version == 'master' && 'origin/main' || inputs.front_version_is_tag == true && format('tags/v{0}', inputs.version) || format('origin/{0}', inputs.version) }}
5358
composer_version: ${{ inputs.version == 'master' && 'dev-master' || (contains(inputs.version, 'x') && format('{0}-dev', inputs.version) || inputs.version) }}
59+
add_sample_data: ${{ inputs.add_sample_data }}
5460
PRIVATE_KEY: ${{ secrets.AWS_DEPLOY_KEY }}
5561
HOSTNAME : ${{ secrets.AWS_HOSTNAME }}
5662
USER_NAME : ${{ secrets.AWS_USER }}
@@ -83,7 +89,9 @@ jobs:
8389
docker compose run --rm php composer config repositories.gally-premium composer $PACKAGIST_URL &&
8490
docker compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-standard:${{ env.composer_version }} as ${{ inputs.last_published_version }}\" &&
8591
docker compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-premium:${{ env.composer_version }}\" &&
86-
docker compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-sample-data:${{ env.composer_version }}\" &&
92+
echo \"Sample data value: ${{ env.add_sample_data }}\" &&
93+
[ \"${{ env.add_sample_data }}\" = false ] || echo \"Install sample data\"
94+
[ \"${{ env.add_sample_data }}\" = false ] || docker compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-sample-data:${{ env.composer_version }}\" &&
8795
docker compose run --rm php sed -i \"s/DoctrineFixturesBundle::class => \['dev' => true, 'test' => true]/DoctrineFixturesBundle::class => ['all' => true]/g\" config/bundles.php &&
8896
GALLY_CATALOG_MEDIA_URL=${MEDIA_URL} SERVER_NAME=$HOSTNAME API_ROUTE_PREFIX=api APP_SECRET=$APP_SECRET POSTGRES_PASSWORD=$POSTGRES_PASSWORD COMPOSER_AUTH='$COMPOSER_AUTH' docker compose -f compose.yml -f compose.int.yml up -d --build
8997
"

0 commit comments

Comments
 (0)