猿问

如何访问 Github Actions Azure 函数部署的详细输出?

我目前正在尝试使用 Github Actions 将 Python Azure 函数部署到函数应用程序。


部署代码如下:-


name: Deploy Azure Function Dev

env:

    PYTHON_VERSION: "3.7"

    WORKING_DIR: ${{ github.workspace }}/data-science-data-acquisition

    FUNCTION_APP_DEV: "data-science-data-acquisition"


on:

  pull_request:

    branches: [master]

    types: [opened,reopened,edited]

    paths: 

      - 'data-science-data-acquisition/**'

  push:

    branches: [master]

    paths: 

      - 'data-science-data-acquisition/**'

jobs:

  build:


    runs-on: ubuntu-latest


    steps:

    - name: "Checkout"

      uses: actions/checkout@v1


    - name: Setup Python ${{ env.PYTHON_VERSION }}

      uses: actions/setup-python@v1

      with:

          python-version: ${{ env.PYTHON_VERSION }}


    - name: 'Run pip'

      shell: bash

      run: |

        # If your function app project is not located in your repository's root

        # Please change your directory for pip in pushd

        pushd ${{ env.WORKING_DIR }}

        python -m pip install --upgrade pip

        pip install -r requirements.txt --target=".python_packages/lib/python3.6/site-packages"

        popd


    - name: 'Azure Login'

      uses: azure/login@v1

      with:

        creds: ${{ secrets.AZURE_CREDENTIALS_DEV }}


    - name: 'Deploy Function App'

      uses: Azure/functions-action@v1

      id: fa

      with:

        app-name: ${{ env.FUNCTION_APP_DEV }}

        package: ${{ env.WORKING_DIR }}

我们目前在部署时遇到问题,但是 Github Actions 中的输出非常有限:-


##[PublishContent]

Waiting for function app to spin up after app settings change.

Package deployment using ZIP Deploy initiated.

##[error]Failed to deploy web package to App Service.

##[warning]Error: Failed to update deployment history.

Bad Request (CODE: 400)


当直接从 VSCode 部署时,会出现更详细的输出,这显然对部署故障排除非常有用:有没有办法从 Github Actions 部署中启用/访问它?


我已经检查了Azure/functions-action 的文档和 Python 特定示例,但看不到任何启用此功能的内容。


哔哔one
浏览 88回答 1
1回答

慕姐4208626

好的,事实证明,仅在第一次运行该操作时才显示详细输出;当它重新运行时,另一个错误导致了问题,因此预期的输出被屏蔽,并在重新运行时被覆盖。
随时随地看视频慕课网APP

相关分类

Python
我要回答