Hello world built with github action.
This repository contains multiple .NET 8 projects demonstrating different aspects of GitHub Actions integration:
Console application that generates barcodes using ZXing.Net and SixLabors.ImageSharp libraries.
ASP.NET Core minimal API web application with:
- Simple Hello World endpoint
- JSON API endpoint with timestamp
- Swagger/OpenAPI documentation
- Integration tests
- Docker support
- Azure WebDeploy deployment via GitHub Actions
- GithubActionsHelloWorldTests: Tests for the console application
- GithubActionsHelloWordWebTests: Integration tests for the web application
- dotnet.yml: Original workflow for building and testing
- dotnet-web-deploy.yml: Enhanced workflow that builds, tests, and deploys the web application to Azure using WebDeploy
To enable Azure deployment:
- Create an Azure Web App
- Download the publish profile from Azure Portal (Deployment Center ? Publish Profile)
- Add the publish profile content as a secret named
AZURE_WEBAPP_PUBLISH_PROFILEin your GitHub repository settings - Update the
app-namevalue in.github/workflows/dotnet-web-deploy.ymlwith your Azure Web App name - Push to
AspNetHelloWorldormainbranch to trigger deployment
# Run console app
cd GithubActionsHelloWorld
dotnet run
# Run web app
cd GithubActionsHelloWordWeb
dotnet run
# Run tests
dotnet test