Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0f51d7b
test
liusliu2023 Mar 19, 2024
376551c
test1
liusliu2023 Mar 19, 2024
1e711fd
test12
liusliu2023 Mar 19, 2024
1e502b4
test123
liusliu2023 Mar 19, 2024
549719e
Create main.yml
liusliu2023 Jul 21, 2025
3b3207e
Update Index.cshtml
liusliu2023 Jul 21, 2025
482f253
Update main.yml
liusliu2023 Jul 21, 2025
d53e8ef
Update Index.cshtml
liusliu2023 Jul 21, 2025
bbd068f
Update Index.cshtml
liusliu2023 Jul 21, 2025
b447abd
Update main.yml
liusliu2023 Jul 21, 2025
91b4d62
Update Index.cshtml
liusliu2023 Jul 21, 2025
3326d72
Create maincredentials.yml
liusliu2023 Jul 21, 2025
88611cd
Update maincredentials.yml
liusliu2023 Jul 22, 2025
3e679d5
Create OpenIDConnect.yml
liusliu2023 Aug 14, 2025
31abee0
Update OpenIDConnect.yml
liusliu2023 Aug 14, 2025
864b62f
Update Index.cshtml
liusliu2023 Aug 14, 2025
2ff5ba7
Update OpenIDConnect.yml
liusliu2023 Aug 14, 2025
11f90eb
Update maincredentials.yml
liusliu2023 Aug 14, 2025
c2e5a21
Update main.yml
liusliu2023 Aug 14, 2025
16de1c9
Update OpenIDConnect.yml
liusliu2023 Aug 15, 2025
d684915
Update OpenIDConnect.yml
liusliu2023 Aug 15, 2025
23305c4
Update Index.cshtml
liusliu2023 Aug 15, 2025
9fc1f68
Update Index.cshtml
liusliu2023 Aug 15, 2025
f369cd3
Update Index.cshtml
liusliu2023 Aug 15, 2025
c376f85
Update Index.cshtml
liusliu2023 Aug 15, 2025
4aa5c9b
Update Index.cshtml
liusliu2023 Aug 15, 2025
c82c73c
Update Index.cshtml
liusliu2023 Aug 15, 2025
0d24ebd
Update Index.cshtml
liusliu2023 Aug 15, 2025
a38aff2
Update Index.cshtml
liusliu2023 Aug 15, 2025
f24e849
Update Index.cshtml
liusliu2023 Aug 18, 2025
0a04858
Update Index.cshtml
liusliu2023 Aug 18, 2025
f63c08c
Update Index.cshtml
liusliu2023 Aug 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/OpenIDConnect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: .NET Core

on: [push]

permissions:
id-token: write
contents: read

env:
AZURE_WEBAPP_NAME: githubtest1 # Set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # Set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '6.0.x' # Set this to the dot net version to use

jobs:
build:
runs-on: windows-latest

steps:
# Check out the repo
- uses: actions/checkout@main
- uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
environment: AzureChinaCloud


# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

# Run dotnet build and publish
- name: dotnet build and publish
run: |
dotnet restore
dotnet build --configuration Release
dotnet publish -c Release --property:PublishDir='${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp'

# Deploy to Azure Web apps
- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp'

- name: logout
run: |
az logout
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on: [pull_request]

env:
AZURE_WEBAPP_NAME: githubtest2 # Set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # Set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '6.0.x' # Set this to the dot net version to use

jobs:
build:
runs-on: windows-latest

steps:
# Check out the repo
- uses: actions/checkout@master

# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

# Run dotnet build and publish
- name: dotnet build and publish
run: |
dotnet restore
dotnet build --configuration Release
dotnet publish -c Release --property:PublishDir='${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp'

# Deploy to Azure Web apps
- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} # Define secret variable in repository settings as per action documentation
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp'
43 changes: 43 additions & 0 deletions .github/workflows/maincredentials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: .NET Core CREDENTIALS

on: [pull_request]

env:
AZURE_WEBAPP_NAME: githubtest1 # Set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: '.' # Set this to the path to your web app project, defaults to the repository root
DOTNET_VERSION: '6.0.x' # Set this to the dot net version to use

jobs:
build:
runs-on: windows-latest

steps:
# Check out the repo
- uses: actions/checkout@master
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

# Setup .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

# Run dotnet build and publish
- name: dotnet build and publish
run: |
dotnet restore
dotnet build --configuration Release
dotnet publish -c Release --property:PublishDir='${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp'

# Deploy to Azure Web apps
- name: 'Run Azure webapp deploy action using Azure Credentials'
uses: azure/webapps-deploy@v3
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }} # Replace with your app name
package: '${{ env.AZURE_WEBAPP_PACKAGE_PATH }}/myapp'

- name: logout
run: |
az logout
2 changes: 1 addition & 1 deletion Pages/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

<div class="text-center">
<h1 class="display-4">Hello World from .NET 7</h1>
<h1 class="display-4">Hello World from .NET 0818-secondBranch</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
<hr />
<div>Host operating system: @Model.OSVersion</div>
Expand Down