forked from vmadhv/project-aspnetcore-dotnetcore-container
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GitHub Workflow YAML definition.
- Loading branch information
1 parent
ebd1175
commit 8b29068
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
name: Build and deploy .NET Core app to Linux WebApp | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.AZURE_CREDENTIALS_GITHUB_SECRET_b573 }} | ||
|
||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 1.1.x | ||
|
||
- name: Install dependencies | ||
run: dotnet restore aspnet-core-dotnet-core | ||
|
||
- name: Build | ||
run: dotnet build aspnet-core-dotnet-core --configuration Release --no-restore | ||
|
||
- name: Publish artifact | ||
run: dotnet publish aspnet-core-dotnet-core --configuration Release --no-build --output publish | ||
|
||
- uses: azure/appservice-settings@v1 | ||
with: | ||
app-name: anchauhLinuxWebApp | ||
general-settings-json: '{"linuxFxVersion": "DOTNETCORE|1.1"}' #'General configuration settings as Key Value pairs' | ||
|
||
- name: Deploy to Azure WebApp | ||
uses: azure/webapps-deploy@v1 | ||
with: | ||
app-name: anchauhLinuxWebApp | ||
package: aspnet-core-dotnet-core/publish | ||
|
||
- name: logout | ||
run: | | ||
az logout |