Skip to content

Commit

Permalink
Bake in the github short sha as the container's release version. (#531)
Browse files Browse the repository at this point in the history
* Bake in the github short sha as the container's release version.

* changed github_sha syntax for consistency within the file

---------

Co-authored-by: Jo <[email protected]>
  • Loading branch information
MelissaAutumn and jdbass authored Jul 10, 2024
1 parent 35f4c63 commit f687f70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,12 @@ jobs:
id: build-backend
env:
ECR_TAG: '${{ steps.login-ecr.outputs.registry }}/${{ vars.PROJECT }}:backend-${{ github.sha }}'
RELEASE_VERSION: ${{ github.sha }}
run: |
# Build a docker container and
# push it to ECR so that it can
# be deployed to ECS.
docker build -t $ECR_TAG ./backend -f ./backend/deploy.dockerfile
docker build --build-arg "RELEASE_VERSION=$RELEASE_VERSION" -t $ECR_TAG ./backend -f ./backend/deploy.dockerfile
docker push $ECR_TAG
echo "image_backend=$ECR_TAG" >> $GITHUB_OUTPUT
echo $ECR_TAG > ecr_tag.txt
Expand Down
2 changes: 2 additions & 0 deletions backend/deploy.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ RUN pip install .'[deploy]'
RUN mkdir src
RUN ln -s /app/appointment src/appointment

ARG RELEASE_VERSION
ENV RELEASE_VERSION=$RELEASE_VERSION

EXPOSE 5000
CMD ["/bin/sh", "./scripts/entry.sh"]

0 comments on commit f687f70

Please sign in to comment.