diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index a4c709b1d..9edb1a79d 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -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 diff --git a/backend/deploy.dockerfile b/backend/deploy.dockerfile index 7a8e78be4..9865ff840 100644 --- a/backend/deploy.dockerfile +++ b/backend/deploy.dockerfile @@ -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"]