Deploy Assist #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Assist | |
on: | |
workflow_dispatch: | |
inputs: { } | |
push: | |
branches: | |
- Azure | |
paths: | |
- 'apps/acme-assist/**' | |
env: | |
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }} | |
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }} | |
KEY_VAULT: ${{ secrets.KEY_VAULT }} | |
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }} | |
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }} | |
AI_APP: assist-service | |
AZURE_OPENAI_MODEL: gpt-35-turbo-16k | |
AZURE_OPENAI_EMBEDDINGMODEL: text-embedding-ada-002 | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: apps/acme-assist | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Run the Maven local build | |
run: mvn package clean | |
- name: Set up Azure | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.SUBSCRIPTION }} | |
- name: Set up Azure Spring Extension | |
run: az extension add --name spring | |
- name: Deploy Assist | |
run: | | |
az spring app deploy --name ${AI_APP} \ | |
--resource-group ${RESOURCE_GROUP} \ | |
--service ${SPRING_APPS_SERVICE} \ | |
--source-path ./ \ | |
--build-env BP_JVM_VERSION=17 \ | |
--env \ | |
SPRING_AI_AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT} \ | |
SPRING_AI_AZURE_OPENAI_API_KEY=${AZURE_OPENAI_API_KEY} |