@@ -10,6 +10,7 @@ name: Build and Push civictheme-monorepo-drupal to Quant Cloud
1010 - release/*
1111 - hotfix/*
1212 - feature/editorial-*
13+ - project/quant-provision
1314 tags :
1415 - ' *'
1516
@@ -37,28 +38,18 @@ jobs:
3738 quant_application : civictheme-monorepo-drupal
3839 master_branch_override : main
3940
40- - name : Override outputs for quant-cloud-migration branch
41+ - name : Override outputs for special branches
4142 id : override-outputs
4243 run : |-
43- # Override outputs for quant-cloud-migration branch to treat it as production
44- if [[ "${{ github.ref }}" == "refs/heads/quant-cloud-migration" ]]; then
45- echo "image_suffix=-latest" >> $GITHUB_OUTPUT
46- echo "image_suffix_clean=latest" >> $GITHUB_OUTPUT
47- echo "is_production=true" >> $GITHUB_OUTPUT
48- echo "environment_name=production" >> $GITHUB_OUTPUT
49- echo "environment_exists=true" >> $GITHUB_OUTPUT
50- echo "Overriding outputs for quant-cloud-migration branch: using -latest suffix and production environment"
51- else
52- # Use the original action outputs
53- echo "image_suffix=${{ steps.init.outputs.image_suffix }}" >> $GITHUB_OUTPUT
54- # Remove leading hyphen from image_suffix for image_suffix parameter
55- suffix="${{ steps.init.outputs.image_suffix }}"
56- clean_suffix="${suffix#-}"
57- echo "image_suffix_clean=$clean_suffix" >> $GITHUB_OUTPUT
58- echo "is_production=${{ steps.init.outputs.is_production }}" >> $GITHUB_OUTPUT
59- echo "environment_name=${{ steps.init.outputs.environment_name }}" >> $GITHUB_OUTPUT
60- echo "environment_exists=${{ steps.init.outputs.environment_exists }}" >> $GITHUB_OUTPUT
61- fi
44+ echo "image_suffix=${{ steps.init.outputs.image_suffix }}" >> $GITHUB_OUTPUT
45+ # Remove leading hyphen from image_suffix for image_suffix parameter
46+ suffix="${{ steps.init.outputs.image_suffix }}"
47+ clean_suffix="${suffix#-}"
48+ echo "image_suffix_clean=$clean_suffix" >> $GITHUB_OUTPUT
49+ echo "is_production=${{ steps.init.outputs.is_production }}" >> $GITHUB_OUTPUT
50+ echo "environment_name=${{ steps.init.outputs.environment_name }}" >> $GITHUB_OUTPUT
51+ echo "environment_exists=${{ steps.init.outputs.environment_exists }}" >> $GITHUB_OUTPUT
52+
6253
6354 - name : Build and push cli image
6455 uses : docker/build-push-action@v5
@@ -119,21 +110,6 @@ jobs:
119110 from_environment : production
120111 image_suffix : ${{ steps.override-outputs.outputs.image_suffix_clean }}
121112
122- - name : Sync database from production to new environment
123- if : ${{ !startsWith(github.ref, 'refs/tags/') && steps.override-outputs.outputs.environment_exists == 'false' && steps.override-outputs.outputs.environment_name
124- != 'production' }}
125- 126- with :
127- api_key : ${{ secrets.QUANT_API_KEY }}
128- organization : ${{ secrets.QUANT_ORGANIZATION }}
129- app_name : ${{ steps.init.outputs.quant_application }}
130- environment_name : ${{ steps.override-outputs.outputs.environment_name }}
131- source : production
132- type : database
133- wait : true
134- wait_interval : 10
135- max_retries : 30
136-
137113 - name : Redeploy existing environment
138114 if : ${{ !startsWith(github.ref, 'refs/tags/') && steps.override-outputs.outputs.environment_exists == 'true' }}
139115 uses : quantcdn/quant-cloud-environment-state-action@v1
0 commit comments