From b576d2c641121db1eec0af8c0351d8ced2bcd32d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Fri, 17 Mar 2023 05:53:47 +0000 Subject: [PATCH] chore: add azure cli --- .../workflows/eoefans-api-azure-deploy.yml | 4 ++ .../workflows/eoefans-spider-azure-deploy.yml | 47 ++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/eoefans-api-azure-deploy.yml b/.github/workflows/eoefans-api-azure-deploy.yml index 7720afe..aa42f2e 100644 --- a/.github/workflows/eoefans-api-azure-deploy.yml +++ b/.github/workflows/eoefans-api-azure-deploy.yml @@ -47,6 +47,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: install azure cli + run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + - run: az --version + - name: Log in to VLINK Container Registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/eoefans-spider-azure-deploy.yml b/.github/workflows/eoefans-spider-azure-deploy.yml index 113aa97..a2a38d8 100644 --- a/.github/workflows/eoefans-spider-azure-deploy.yml +++ b/.github/workflows/eoefans-spider-azure-deploy.yml @@ -45,7 +45,11 @@ jobs: steps: - uses: actions/checkout@v3 - + + - name: install azure cli + run: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash + - run: az --version + - name: Log in to VLINK Container Registry uses: docker/login-action@v2 with: @@ -53,6 +57,47 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - uses: azure/login@v1 + with: + creds: '${{ env.AZURE_CREDENTIALS }}' + + - name: Set Web App configuration + uses: Azure/appservice-settings@v1 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + app-settings-json: | + [ + { + "name": "DOCKER_REGISTRY_SERVER_PASSWORD", + "value": "${{ secrets.GITHUB_TOKEN }}", + "slotSetting": false + }, + { + "name": "DOCKER_REGISTRY_SERVER_URL", + "value": "https://${{ env.IMAGE_REGISTRY }}", + "slotSetting": false + }, + { + "name": "DOCKER_REGISTRY_SERVER_USERNAME", + "value": "${{ github.actor }}", + "slotSetting": false + }, + { + "name": "SENTRY_RELEASE", + "value": "${{ env.DEPLOY_VERSION }}", + "slotSetting": false + }, + { + "name": "SENTRY_ENV", + "value": "production", + "slotSetting": false + }, + { + "name": "VERSION", + "value": "${{ env.DEPLOY_VERSION }}", + "slotSetting": false + } + ] - name: Deploy to Azure Web App id: deploy-to-webapp uses: azure/webapps-deploy@v2