Skip to content

[github-nfbot] Improve PR content checks #101

[github-nfbot] Improve PR content checks

[github-nfbot] Improve PR content checks #101

# Copyright (c) .NET Foundation and Contributors
# See LICENSE file in the project root for full license information.
name: Build and deploy nanoFramework GitHubBot
on:
push:
branches:
- main
paths:
- github-nfbot/GitHub-nfbot/**
pull_request:
paths:
- github-nfbot/GitHub-nfbot/**
env:
AZURE_FUNCTIONAPP_NAME: NanoFramework-GitHubBot
AZURE_FUNCTIONAPP_PACKAGE_PATH: .\published
CONFIGURATION: Release
DOTNET_VERSION: '6.0.x'
WORKING_DIRECTORY: .
DOTNET_CORE_VERSION_INPROC: ''
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build Azure Function
run: |
dotnet build "github-nfbot/GitHub-nfbot" --configuration ${{ env.CONFIGURATION }} --output "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}"
- name: Deploy to Azure Function App
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: Azure/functions-action@v1
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
publish-profile: ${{ secrets.NANOFRAMEWORK_GITHUBBOT_FFFF }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}