Created
May 13, 2024 11:41
-
-
Save machv/9d8df3929633fe992af1ff02bd2891b0 to your computer and use it in GitHub Desktop.
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 Azure Function App | |
on: | |
push: | |
paths: | |
- 'azf/**' | |
branches: [ main ] | |
workflow_dispatch: | |
# CONFIGURATION | |
# 1. Set up the following secrets in your repository: | |
# AZURE_FUNCTIONAPP_PUBLISH_PROFILE | |
# 2. Change these variables for your configuration: | |
env: | |
AZURE_FUNCTIONAPP_NAME: 'mslab-sec-func-tools-001' | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: './azf' | |
jobs: | |
build-and-deploy: | |
runs-on: windows-latest | |
environment: production | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@v3 | |
- name: 'Login via Azure CLI' | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }} | |
- name: 'Run Azure Functions Action' | |
uses: Azure/functions-action@v1 | |
id: fa | |
with: | |
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} | |
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment