Deploy Controller Function to Azure #130
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: 'awesomeproj-dev-controller-function-app' | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: './github-runner-controller-function' # working-directory already set to this | |
PYTHON_VERSION: '3.11' | |
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: list | |
run: | | |
echo "=== Repository structure ===" | |
ls -la | |
- 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 | |
with: | |
app-name: 'awesomeproj-dev-controller-function-app' | |
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} | |
scm-do-build-during-deployment: true | |
enable-oryx-build: true | |