|
22 | 22 | required: false |
23 | 23 | default: false |
24 | 24 | type: boolean |
| 25 | + add_sample_data: |
| 26 | + description: "Install sample data" |
| 27 | + required: false |
| 28 | + default: true |
| 29 | + type: boolean |
25 | 30 | secrets: |
26 | 31 | AWS_DEPLOY_KEY: |
27 | 32 | required: true |
|
51 | 56 | back_branch: ${{ inputs.back_version_is_tag == true && format('tags/{0}', inputs.version) || format('origin/{0}', inputs.version) }} |
52 | 57 | front_branch: ${{ inputs.version == 'master' && 'origin/main' || inputs.front_version_is_tag == true && format('tags/v{0}', inputs.version) || format('origin/{0}', inputs.version) }} |
53 | 58 | 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 }} |
54 | 60 | PRIVATE_KEY: ${{ secrets.AWS_DEPLOY_KEY }} |
55 | 61 | HOSTNAME : ${{ secrets.AWS_HOSTNAME }} |
56 | 62 | USER_NAME : ${{ secrets.AWS_USER }} |
|
69 | 75 | ([[ $(docker volume ls -q | awk '!/_/' | wc -l) -eq 0 ]] || docker volume rm $(docker volume ls -q | awk '!/_/' | tr '\n' ' ')) && |
70 | 76 | make .env && |
71 | 77 | POSTGRES_PASSWORD=$POSTGRES_PASSWORD docker compose -f compose.yml -f compose.int.yml up -d database && |
72 | | - POSTGRES_PASSWORD=$POSTGRES_PASSWORD docker compose -f compose.yml run --rm bin/console lexik:jwt:generate-keypair --skip-if-exists && |
| 78 | + POSTGRES_PASSWORD=$POSTGRES_PASSWORD docker compose -f compose.yml run --rm php bin/console lexik:jwt:generate-keypair --skip-if-exists && |
73 | 79 | docker compose -f compose.yml -f compose.int.yml down && |
74 | | - git fetch --all && git reset --hard && git checkout ${{ env.back_branch }} && |
| 80 | + git fetch --all && git reset --hard && git checkout ${{ env.back_branch }} && |
75 | 81 | [ -d front/gally-admin ] || git clone https://github.com/Elastic-Suite/gally-admin.git front/gally-admin && |
76 | 82 | cd front/gally-admin && git fetch --all && git reset --hard && git checkout ${{ env.front_branch }} && |
77 | 83 | cd /home/ubuntu/gally && |
|
83 | 89 | docker compose run --rm php composer config repositories.gally-premium composer $PACKAGIST_URL && |
84 | 90 | docker compose run --rm -e COMPOSER_AUTH='$COMPOSER_AUTH' php composer require \"gally/gally-standard:${{ env.composer_version }} as ${{ inputs.last_published_version }}\" && |
85 | 91 | 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 }}\" && |
87 | 95 | docker compose run --rm php sed -i \"s/DoctrineFixturesBundle::class => \['dev' => true, 'test' => true]/DoctrineFixturesBundle::class => ['all' => true]/g\" config/bundles.php && |
88 | 96 | 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 |
89 | 97 | " |
0 commit comments