File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 GITHUB_SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-7)
2525 echo "GITHUB_SHA_SHORT=${GITHUB_SHA_SHORT}" >> $GITHUB_ENV
2626 echo "::set-output name=GITHUB_SHA_SHORT::${GITHUB_SHA_SHORT}"
27+ - name : Set lowercase image name
28+ run : echo "IMAGE_NAME_LOWER=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
2729 - name : Build image
2830 run : docker compose -f deployment/docker-compose.ci.yml build
2931 - name : Docker login
4951
5052 steps :
5153 - uses : actions/checkout@v3
54+ - name : Set lowercase image name
55+ run : echo "IMAGE_NAME_LOWER=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
5256 - name : Set up Python 3.9
5357 uses : actions/setup-python@v1
5458 with :
@@ -139,6 +143,6 @@ jobs:
139143 # TODO: It would be better to use docker-compose against the django service,
140144 # but there is currently a bug in docker-compose preventing running services
141145 # over an SSH host.
142- IMAGE=${REGISTRY}/${IMAGE_NAME }/django:${GITHUB_SHA_SHORT}
146+ IMAGE=${REGISTRY}/${IMAGE_NAME_LOWER }/django:${GITHUB_SHA_SHORT}
143147 docker run --rm --env-file .env ${IMAGE} python manage.py migrate
144148 echo "Deployment complete"
Original file line number Diff line number Diff line change 1- version : " 3.8"
2-
31services :
42 django :
53 build :
64 context : ..
75 dockerfile : ./deployment/Dockerfile
8- image : ${REGISTRY}/${IMAGE_NAME }/django:${GITHUB_SHA_SHORT}
6+ image : ${REGISTRY}/${IMAGE_NAME_LOWER }/django:${GITHUB_SHA_SHORT}
Original file line number Diff line number Diff line change 1- version : " 3.8"
2-
31services :
42 django :
5- image : ${REGISTRY}/${IMAGE_NAME }/django:${GITHUB_SHA_SHORT}
3+ image : ${REGISTRY}/${IMAGE_NAME_LOWER }/django:${GITHUB_SHA_SHORT}
64 command : gunicorn hackathon_site.wsgi:application --bind 0.0.0.0:8000 --workers 5 --capture-output --access-logfile - --error-logfile -
75 ports :
86 - " 8000:8000"
You can’t perform that action at this time.
0 commit comments