Skip to content

Commit

Permalink
Update WebApp.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mmdmirh authored Aug 22, 2024
1 parent ecf0c93 commit 9a1a5d4
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions .github/workflows/WebApp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,40 @@ on:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:

- name: Docker Login
uses: docker/login-action@v2.1.0
with:
username: fruocco
# Password or personal access token used to log against the Docker registry
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- uses: actions/checkout@v3
- name: Build the Docker image
run:
docker build . --file WebApp.Dockerfile --tag fruocco/oai-embeddings:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag fruocco/oai-embeddings:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruocco/oai-embeddings:latest;
docker push fruocco/oai-embeddings:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push fruocco/oai-embeddings:latest;

docker build . --file BatchProcess.Dockerfile --tag fruocco/oai-batch:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker tag fruocco/oai-batch:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruocco/oai-batch:latest;
docker push fruocco/oai-batch:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER;
docker push fruocco/oai-batch:latest;

- name: Build and Push Docker Images
run: |
# Build and push the WebApp image
docker build . --file WebApp.Dockerfile --tag fruocco/oai-embeddings:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER
docker tag fruocco/oai-embeddings:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruocco/oai-embeddings:latest
docker push fruocco/oai-embeddings:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER
docker push fruocco/oai-embeddings:latest
# Build and push the BatchProcess image
docker build . --file BatchProcess.Dockerfile --tag fruocco/oai-batch:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER
docker tag fruocco/oai-batch:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER fruocco/oai-batch:latest
docker push fruocco/oai-batch:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER
docker push fruocco/oai-batch:latest
deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v3
with:
app-name: 'embeddings-qna' # Replace with your app name
images: fruocco/oai-embeddings:latest # The image to deploy
publish-profile: ${{ secrets.AzureAppService_PublishProfile }}

0 comments on commit 9a1a5d4

Please sign in to comment.