-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Hello, I'm trying to deploy an Azure Function in python v2 using RBAC over a consumption plan and I have been having a lot of trouble, can you please help me seee what I'm missing?
This is what I've been running:
steps:
- name: 'Checkout project'
uses: actions/checkout@v4
- name: 'Login via Azure CLI'
uses: azure/login@v2
with:
creds: ${{ inputs.azure_credentials }}
- name: Setup Python ${{ inputs.python_version }} Environment
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python_version }}
- name: 'Install dependencies'
shell: bash
run: |
pushd './${{ inputs.azure_function_package_path }}'
python -m pip install --upgrade pip
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
popd
- name: 'Deploy Azure Function'
uses: Azure/functions-action@v1
with:
app-name: ${{ inputs.azure_function_name }}
package: ${{ inputs.azure_function_package_path }}
scm-do-build-during-deployment: true
enable-oryx-build: true
respect-funcignore: true
When I try with AzureWebJobsStorage__accountName the pipeline fails with a permission error even though the function has Storage blob data owner, and storageKeyOperator set
When I have AzureWebJobsStorage set with the storage connection string it's able to deploy but the Azure Function doesn't show up even though the code can be looked at.
Locally my function looks good and works.
The way I got it to deploy was running func azure functionapp publish my-func from VSCode, it deploys and works but then it deletes the WEBSITE_RUN_FROM_PACKAGE env var.
How can I do the same using the action?
I've tried deploying from a zip file setting roles setting and deleting ENABLE_ORYX_BUILD and SCM_DO_BUILD_DURING_DEPLOYMENT, the only way to deploy it is from my local environment using func, but I need to do it from a GitHub pipeline. What else can I try?
Thanks