diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 98a3397..e978e5a 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -6,17 +6,16 @@ on: - main env: - AZURE_WEBAPP_NAMES: ["test-service", "app-service"] + AZURE_WEBAPP_NAMES: ${{ secrets.AZURE_WEBAPP_NAMES }} AZURE_WEBAPP_SHARED_LIBS_PATH: "libs" - AZURE_WEBAPP_SERVICE_PATHS: ["test-service", "app-service"] - AZURE_WEBAPP_PUBLISH_PROFILES: - ["${{ secrets.PUBLISH_PROFILE }}", "${{ secrets.APP_PUBLISH_PROFILE }}"] + AZURE_WEBAPP_SERVICE_PATHS: "test-service,app-service" + AZURE_WEBAPP_PUBLISH_PROFILES: ${{ secrets.PUBLISH_PROFILE }},${{ secrets.APP_PUBLISH_PROFILE }} jobs: build-and-deploy: strategy: matrix: - service: ${{ fromJson(secrets.AZURE_WEBAPP_NAMES) }} + service: ${{ fromJson(env.AZURE_WEBAPP_NAMES) }} runs-on: ubuntu-latest steps: @@ -35,7 +34,7 @@ jobs: run: | mkdir -p deployment_packages cp -r $AZURE_WEBAPP_SHARED_LIBS_PATH/* deployment_packages/ - cp -r ${{fromJson(secrets.AZURE_WEBAPP_SERVICE_PATHS)[matrix.service]}}/* deployment_packages/ + cp -r ${{fromJson(env.AZURE_WEBAPP_SERVICE_PATHS)[matrix.service]}}/* deployment_packages/ cd deployment_packages && zip -r ../${{matrix.service}}.zip . -x '*.git*' && cd .. working-directory: ${{ github.workspace }} @@ -43,5 +42,5 @@ jobs: uses: azure/webapps-deploy@v2 with: app-name: ${{matrix.service}} - publish-profile: ${{fromJson(secrets.AZURE_WEBAPP_PUBLISH_PROFILES)[matrix.service]}} + publish-profile: ${{fromJson(env.AZURE_WEBAPP_PUBLISH_PROFILES)[matrix.service]}} package: ${{ github.workspace }}/${{matrix.service}}.zip