Skip to content

Commit

Permalink
Reverting CD with CLI
Browse files Browse the repository at this point in the history
Apparently azure gov won't support cross-cloud cli logins with app registrations.
  • Loading branch information
joelbyford authored Dec 3, 2020
1 parent 5280788 commit 8b8445c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/dotnetcore-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
name: .NET Core - Release from Master
#
# Run when pushed to master (successfull PR with branch permissions turned on)
#
on:
push:
branches: master

branches: master
env:
AZURE_WEBAPP_NAME: qrcode-api-app # set this to your application's name

jobs:
build-and-deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Login to Azure
run: dotnet build --configuration Release
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.2.108

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: |
echo "Logging into Azure..."
az login --service-principal -u ${{ secrets.CLIENT_ID }} -p ${{ secrets.CLIENT_SECRET }} --tenant ${{ secrets.TENANT_ID }}
- name: 'Perform an az cli appservice slotswap'
run: |
echo "Running a CLI Slot Swap..."
az webapp deployment slot swap --name qrcode-api-app --resource-group rgDoNotDeleteDemos --slot test --target-slot Production
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: 'Run Azure webapp deploy action using publish profile credentials'
uses: azure/webapps-deploy@v1
with:
app-name: ${{env.AZURE_WEBAPP_NAME}}
publish-profile: ${{ secrets.azureWebAppPublishProfile }}
package: ${{env.DOTNET_ROOT}}/myapp

0 comments on commit 8b8445c

Please sign in to comment.