File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,14 @@ name: "Release"
22on :
33 workflow_dispatch :
44 inputs :
5- environment :
6- description : ' Environment'
7- required : true
8- default : ' dev'
9-
5+ build_flag :
6+ description : ' Docker Build Flags'
7+ default : ' '
8+ type : choice
9+ options :
10+ - ' '
11+ - ' --no-cache'
12+
1013jobs :
1114 build :
1215 runs-on : ubuntu-latest
3740
3841 - name : Build and push
3942 run : |
40- docker compose -f docker-compose.build.yml --env-file tdei_uw.env build --build-arg CODE_VERSION=${CODE_VERSION}
43+ docker compose -f docker-compose.build.yml --env-file tdei_uw.env build --build-arg CODE_VERSION=${CODE_VERSION} {{github.event.inputs.build_flag}}
4144 docker compose -f docker-compose.build.yml --env-file tdei_uw.env push
4245 env :
4346 ENV : ${{ vars.ENV }}
8891 docker context create dev --docker "host=ssh://github-actions@${{ vars.AZURE_DOCKER_HOST_IP }}"
8992 docker context use dev
9093
91- # stop all running images, remove the containers, remove the images
92- # why? in case we're rebuilding the image of the same commit, we want to ensure the newer image is deployed
93- # in case the last one was corrupted for some reason--just to avoid any questions about deployment reliability
94- #docker stop $(docker ps -q)
95- #docker rm -v $(docker ps --filter status=exited -q)
96- #docker rmi $(docker images -q)
97-
9894 # remove images no longer in use--may need disk space to pull
9995 echo Pruning old docker images
10096 docker image prune -a -f
@@ -103,8 +99,10 @@ jobs:
10399 docker compose -f docker-compose.deploy.yml --env-file tdei_uw.env up -d --force-recreate --remove-orphans
104100
105101 # check what was deployed, just to save in the GH logs
106- echo Waiting for deployment to complete; listing deployed artifacts
102+ echo Waiting for deployment to complete
107103 sleep 30s
104+
105+ echo Deploy list
108106 docker ps
109107
110108
You can’t perform that action at this time.
0 commit comments