diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2080f60..664f45a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,7 +82,7 @@ jobs: run: | if [ "$GITHUB_REF" = "refs/heads/staging" ] then - docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api-staging + docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api-staging:$GITHUB_SHA -t $AZURE_CONTAINER_REGISTRY/statistics-api-staging:latest az webapp config appsettings set --subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }} -g $AZURE_RESOURCE_GROUP -n $AZURE_APP_NAME --slot staging --settings \ "CANVAS_ACCESS_KEY=${{ secrets.CANVAS_ACCESS_KEY }}" \ "DB_PASSWORD=${{ secrets.STAGING_DB_PASSWORD }}" \ @@ -94,10 +94,11 @@ jobs: "DOCKER_REGISTRY_SERVER_URL=https://$AZURE_CONTAINER_REGISTRY" \ "GIT_COMMIT=${GITHUB_SHA}" \ @"${GITHUB_WORKSPACE}/.github/app_service_config/staging_app_service_config.json" - docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging + docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging:$GITHUB_SHA + docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging:latest elif [ "$GITHUB_REF" = "refs/heads/master" ] then - docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api + docker build --build-arg WEBSITES_PORT=$WEBSITES_PORT . -f Dockerfile -t $AZURE_CONTAINER_REGISTRY/statistics-api:$GITHUB_SHA -t $AZURE_CONTAINER_REGISTRY/statistics-api:latest az webapp config appsettings set --subscription ${{ secrets.AZURE_SUBSCRIPTION_ID }} -g $AZURE_RESOURCE_GROUP -n $AZURE_APP_NAME --settings \ "CANVAS_ACCESS_KEY=${{ secrets.CANVAS_ACCESS_KEY }}" \ "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" \ @@ -109,5 +110,6 @@ jobs: "DOCKER_REGISTRY_SERVER_URL=https://$AZURE_CONTAINER_REGISTRY" \ "GIT_COMMIT=${GITHUB_SHA}" \ @"${GITHUB_WORKSPACE}/.github/app_service_config/app_service_config.json" - docker push $AZURE_CONTAINER_REGISTRY/statistics-api + docker push $AZURE_CONTAINER_REGISTRY/statistics-api:$GITHUB_SHA + docker push $AZURE_CONTAINER_REGISTRY/statistics-api:latest fi diff --git a/requirements.txt b/requirements.txt index 42f66dd..0f6e164 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ requests==2.31.0 SQLAlchemy-Utils==0.41.1 APScheduler==3.10.4 django~=3.2 -gunicorn~=21.2.0 +gunicorn~=22.0.0 mysqlclient==2.1.1 arrow~=1.3.0 python-graphql-client~=0.4.3