Deploy Controller Function to Azure #122
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Controller Function to Azure | |
run-name: Deploy Controller Function to Azure | |
on: | |
push: | |
paths: | |
- github-runner-controller-function/** | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
working-directory: github-runner-controller-function | |
env: | |
AZURE_FUNCTIONAPP_NAME: '' # set this to your function app name on Azure | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your function app project, defaults to the repository root | |
PYTHON_VERSION: '3.11' # set this to the python version to use (e.g. '3.6', '3.7', '3.8') | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- name: 'Checkout Controller Function' | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | |
github-runner-controller-function | |
- name: 'Login via Azure CLI' | |
uses: azure/login@v2 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: 'Run Azure Functions Action' | |
uses: Azure/functions-action@v1 | |
id: fa | |
with: | |
app-name: 'awesomeproj-dev-controller-function-app' | |
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} | |
scm-do-build-during-deployment: true | |
enable-oryx-build: true | |