https://github.com/kzu/minimalfunctions
Mostly minimal .NET 6.0 preview APIs in Azure Functions
https://github.com/kzu/minimalfunctions
azure azure-functions serverless
Last synced: about 2 months ago
JSON representation
Mostly minimal .NET 6.0 preview APIs in Azure Functions
- Host: GitHub
- URL: https://github.com/kzu/minimalfunctions
- Owner: kzu
- License: mit
- Created: 2021-09-02T15:26:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-09T18:46:03.000Z (about 1 year ago)
- Last Synced: 2025-11-21T16:03:19.095Z (5 months ago)
- Topics: azure, azure-functions, serverless
- Language: C#
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: readme.md
- Funding: .github/FUNDING.yml
- License: license.txt
- Code of conduct: code-of-conduct.md
- Security: security.md
- Support: support.md
Awesome Lists containing this project
README
# MinimalFunctions
(Mostly) Minimal .NET 6.0 (preview) APIs in Azure Functions
End-to-end example of building and deploying .NET 6 APIs to
Azure Functions (current stable, v3) runtime using GitHub
actions.
Steps to get (this) end-to-end .NET6 function running in Azure Functions:
1. Fork this repo
1. Create a Functions app using a new resource group named `minimalfunction`, .NET 3.1 runtime, Windows hosting
1. Using the Azure CLI, [create credentials](https://github.com/Azure/functions-action#using-azure-service-principal-for-rbac-as-deployment-credential) for the deployment with:
`az ad sp create-for-rbac --name minimalfunction --role contributor --scopes "/subscriptions/[SUBSCRIPTION_ID]/resourceGroups/minimalfunction" --sdk-auth`
Note the use of the resource group as the scope, *not* just the web app (didn't work with that for me).
1. Copy the resulting json and set it as a repository secret named `AZURE_CREDENTIALS`
1. Add another repository secret named `AZURE_APPNAME` with your function app name for deployment
1. The build script needs to install func v4 with `npm i -g azure-functions-core-tools@4 --unsafe-perm true`,
and then do the publish with `func azure functionapp publish ${{ secrets.AZURE_APPNAME }} --force`.
> Using `--no-build` [option](https://docs.microsoft.com/en-us/azure/azure-functions/functions-core-tools-reference?tabs=v2#func-azure-functionapp-publish) didn't work for me.
> Additional build args can be passed at the end with `--dotnet-cli-params -- -p:PROP=VALUE ...`.