-
-
Save bhanu-prakashl/548d8f614f7ecabedb24bda6698c84e0 to your computer and use it in GitHub Desktop.
Authoring DevOps pipelines using YAML in GitHub Actions
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
az login | |
az group create --name <resource-group-name> --location eastus | |
az appservice plan create --name <plan-name> --resource-group <resource-group-name> --is-linux | |
az webapp create --name <app-name> --plan <plan-name> --resource-group <resource-group-name> --runtime DOTNET:6.0 | |
az webapp up --name <app-name> --plan <plan-name> --os-type linux --runtime DOTNET:6.0 | |
az ad sp create-for-rbac --name <aad-app-name> --sdk-auth --role contributor --scopes /subscriptions/<subscription-id>/resourceGroups/<resource-group> |
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: .NET CI | |
on: push | |
jobs: | |
build-job: | |
name: Build .NET assets | |
runs-on: ubuntu-latest | |
container: mcr.microsoft.com/dotnet/sdk:6.0 | |
steps: | |
- run: dotnet --version | |
name: Check .NET version | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- run: | | |
dotnet publish \ | |
--configuration Release \ | |
--output out | |
name: Publish .NET web application | |
- name: Upload published app | |
uses: actions/upload-artifact@v2 | |
with: | |
name: web-app | |
path: out/ | |
push-azure-job: | |
name: Publish to Azure | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
name: Checkout code | |
- uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- run: | | |
az account show | |
name: Show account details |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment