Skip to content

Remove unused OpenAI service module #38

Remove unused OpenAI service module

Remove unused OpenAI service module #38

name: Build and Push Docker Image to Azure Container Registry
on:
push:
branches:
- 'feat/**'
# paths:
# - 'Bouvet.Developer.Survey.Backend/**'
env:
DOTNET_VERSION: "8.0"
IMAGE_TAG: ${{ github.sha }}
jobs:
build:
runs-on: ubuntu-latest
name: Build 🛠️
container:
image: mcr.microsoft.com/dotnet/sdk:8.0
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Dotnet restore
working-directory: ./Bouvet.Developer.Survey.Backend
run: dotnet restore Bouvet.Developer.Survey.Backend.generated.sln
- name: Build with dotnet
working-directory: ./Bouvet.Developer.Survey.Backend
run: dotnet build Bouvet.Developer.Survey.Backend.generated.sln --configuration Release --no-restore
- name: Publish
working-directory: ./Bouvet.Developer.Survey.Backend
run: dotnet publish Bouvet.Developer.Survey.Backend.generated.sln --configuration Release --no-build
test:
runs-on: ubuntu-latest
needs: build
name: Test 🧪
container:
image: mcr.microsoft.com/dotnet/sdk:8.0
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Dotnet restore
working-directory: ./Bouvet.Developer.Survey.Backend
run: dotnet restore Bouvet.Developer.Survey.Backend.generated.sln
- name: Build with dotnet
working-directory: ./Bouvet.Developer.Survey.Backend
run: dotnet build Bouvet.Developer.Survey.Backend.generated.sln --configuration Release --no-restore
- name: Test with dotnet
working-directory: ./Bouvet.Developer.Survey.Backend
run: dotnet test
deploy-to-azure:
needs: [build, test]
runs-on: ubuntu-latest
name: Deploy to Azure 🚀
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build the Docker image
working-directory: ./Bouvet.Developer.Survey.Backend
run: docker build . --file Dockerfile --tag backend-image:${{ env.IMAGE_TAG }}
# Log in to Azure Container Registry
- name: Log in to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.AZURE_CONTAINER_REGISTRY_NAME_TEST }}.azurecr.io
username: ${{ secrets.AZURE_CONTAINER_REGISTRY_USERNAME_TEST }}
password: ${{ secrets.AZURE_CONTAINER_REGISTRY_PASSWORD_TEST }}
# Tag the image for ACR
- name: Tag Docker image
run: docker tag backend-image:${{ env.IMAGE_TAG }} ${{ secrets.AZURE_CONTAINER_REGISTRY_NAME_TEST }}.azurecr.io/backend-image:${{ env.IMAGE_TAG }}
# Push the image to ACR
- name: Push Docker image to ACR
run: docker push ${{ secrets.AZURE_CONTAINER_REGISTRY_NAME_TEST }}.azurecr.io/backend-image:${{ env.IMAGE_TAG }}