Azure Functions recently introduced a new Flex Consumption plan, which is still in preview mode.
The key improvements over the ‘legacy’ Consumption plan include always-ready instances and built-in Virtual Network (VNet) integration.
While setting up GitHub Actions deployment for my app on the Flex Consumption plan, I couldn’t find any working examples—likely due to the plan’s novelty. So, I’m sharing my configuration that works:
- name: 'Deploy Azure function to D'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }}
sku: 'flexconsumption' # new parameter for Flex Consumption plan
remote-build: 'true' # enable build action from Kudu
Primary difference from most examples is that you no longer need to set ‘scm-do-build-during-deployment: true’ or ‘enable-oryx-build: true’. These options are automatically handled by the new ‘sku: ‘flexconsumption’‘ parameter.
Also ‘remote-build: 'true'‘ should be added.
For a detailed breakdown of all available options in the Azure Functions GitHub action, check out the official action.yml on GitHub.
Thank you so much! I followed your guidance and added the "sku" and "remote-build" to the yml file, it works now.