Skip to content

Commit

Permalink
Merge pull request #197 from matematikk-mooc/KURSP-1162-image-tags
Browse files Browse the repository at this point in the history
KURSP-1162: Tag docker image with git hash and latest
  • Loading branch information
theahthodesen authored Apr 11, 2024
2 parents 664035a + d15fa40 commit 95d0946
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}" \
Expand All @@ -97,7 +97,7 @@ jobs:
docker push $AZURE_CONTAINER_REGISTRY/statistics-api-staging
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 }}" \
Expand Down

0 comments on commit 95d0946

Please sign in to comment.