File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 3535 description : " The platforms to build with docker bake."
3636 type : string
3737 required : false
38+ migrate-command :
39+ description : " The command to run migrations."
40+ type : string
41+ required : false
42+
3843
3944
4045jobs :
@@ -83,14 +88,27 @@ jobs:
8388 with :
8489 module-name : ${{ inputs.service-name }}
8590 build-for-environment : ${{ inputs.stage-name }}
91+ image-ref : ${{ inputs.docker-image-ref }}
8692 extra-build-args : " -f ${{ matrix.dockerfile }}"
8793
8894
95+ migrate :
96+ runs-on : mdb-dev
97+ container : ${{ secrets.ECR_REGISTRY }}/${{ inputs.service-name }}:${{ inputs.stage-name }}-${{ inputs.docker-image-ref }}
98+ needs : [get-deploy-labels, build]
99+ if : ${{ needs.get-deploy-labels.outputs.deploy-envs != '[]' }}
100+ steps :
101+ - name : Run migrations
102+ if : ${{ inputs.migrate-command }}
103+ run : |
104+ ${{ inputs.migrate-command }}
105+
106+
89107 # Deploy the built image to the specified environments
90108 # Deploys to all environments at once
91109 deploy :
92110 runs-on : mdb-dev
93- needs : [ get-deploy-labels, build ]
111+ needs : [ get-deploy-labels, build, migrate ]
94112 strategy :
95113 matrix :
96114 deploy-env : ${{fromJson(needs.get-deploy-labels.outputs.deploy-envs)}}
You can’t perform that action at this time.
0 commit comments