Enable incremental product embedding (#207) #24
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 Catalog | |
on: | |
workflow_dispatch: | |
inputs: { } | |
push: | |
branches: | |
- Azure | |
paths: | |
- 'apps/acme-catalog/**' | |
env: | |
SPRING_APPS_SERVICE: ${{ secrets.SPRING_APPS_SERVICE }} | |
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }} | |
KEY_VAULT: ${{ secrets.KEY_VAULT }} | |
CATALOG_SERVICE_APP: catalog-service | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: apps/acme-catalog | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build -x test | |
build-root-directory: apps/acme-catalog | |
- 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 Catalog | |
run: | | |
keyvault_uri=$(az keyvault show \ | |
--resource-group ${RESOURCE_GROUP} \ | |
--name ${KEY_VAULT} \ | |
--query properties.vaultUri -o tsv) | |
az spring app deploy \ | |
--name ${CATALOG_SERVICE_APP} \ | |
--resource-group "$RESOURCE_GROUP" \ | |
--service "$SPRING_APPS_SERVICE" \ | |
--env "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_ENDPOINT=${keyvault_uri}" "SPRING_CLOUD_AZURE_KEYVAULT_SECRET_PROPERTY_SOURCES_0_NAME=${KEY_VAULT}" "SPRING_PROFILES_ACTIVE=default,key-vault" \ | |
--config-file-pattern catalog/default,catalog/key-vault \ | |
--build-env BP_JVM_VERSION=17 \ | |
--source-path ./ |