Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
106 changes: 106 additions & 0 deletions .github/workflows/echobot-build-ECHO.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: .NET BOT D1 BUILD ECHO

on:
push:
branches:
- 'master'
paths:
- './Samples/PublicSamples/EchoBot/src/**'
- .github/workflows/echobot-build-ECHO.yml

pull_request:
branches:
- 'master'
paths:
- './Samples/PublicSamples/EchoBot/src/**'
- .github/workflows/echobot-build-ECHO.yml

workflow_dispatch:

env:
# /home/runner/work/publish
Base: publish
Component: EchoBot
BuildName: 0.1.${{ github.run_number }}
Environment: D1
OrgName: ECHO
Location: centralus

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE

- name: Run pwsh
shell: pwsh
run: |
echo "${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/"
- uses: nuget/setup-nuget@v1
- run: nuget restore Samples\PublicSamples\EchoBot\src\EchoBot.sln

- name: Create Build Directory
run: mkdir ${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/

- name: Build Solution
run: |
msbuild.exe Samples\PublicSamples\EchoBot\src\EchoBot.sln /nologo /p:platform="x64" /p:OutDir=${{ github.workspace }}/${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/

- name: Run pwsh
shell: pwsh
run: |
Get-ChildItem -Path ${{ github.workspace }}\${{ env.Base }}\${{ env.Component }}\${{ env.BuildName }}\
echo ${{ github.workspace }}

- name: Login via Az module
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS_ECHO_BOT }}
enable-AzPSSession: true

- name: G1_RG_UploadArtifacts_to_Blob
uses: Azure/powershell@v2
with:
inlineScript: |
Get-ChildItem -Path ./${{ env.Base }}/${{ env.Component }}/${{ env.BuildName }}/ # -Recurse

$Params = @{
App = 'BOT'
BuildName = $env:BuildName
ComponentName = $env:Component
BasePath = $env:Base
OrgName = $env:OrgName
Location = $env:location
}
& ./Samples/PublicSamples/EchoBot/ADF/release-az/Sync-AzBuildComponent.ps1 @Params
azPSVersion: latest

- name: G1_RG_UpdateBuildMeta_to_Blob
uses: Azure/powershell@v2
with:
inlineScript: |
echo $home
ls $home

$Params = @{
App = 'BOT'
BuildName = $env:BuildName
ComponentName = $env:Component
BasePath = $env:Base
OrgName = $env:OrgName
Location = $env:location
Environment = $env:Environment
}
& ./Samples/PublicSamples/EchoBot/ADF/release-az/Update-AzBuildMetaData.ps1 @Params
azPSVersion: latest



57 changes: 57 additions & 0 deletions .github/workflows/echobot-infra-ECHO.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: .NET BOT D1 INFRA ECHO

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
push:
branches:
- 'master'
paths:
- './Samples/PublicSamples/EchoBot/ADF/**'
- .github/workflows/echobot-infra-ECHO.yml

pull_request:
branches:
- 'master'
paths:
- './Samples/PublicSamples/EchoBot/ADF/**'
- .github/workflows/echobot-infra-ECHO.yml

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
OrgName: ECHO
Location: centralus

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
EnvironmentDeploy:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login via Az module
uses: azure/login@v2
with:
creds: ${{secrets.AZURE_CREDENTIALS_ECHO_BOT}}
enable-AzPSSession: true

- name: Deploy_All_Subscription
uses: Azure/powershell@v2
with:
azPSVersion: latest
inlineScript: |
$Params = @{
OrgName = $env:OrgName
Location = $env:location
FullUpload = $true
}
./Samples/PublicSamples/EchoBot/ADF/main.ps1 @Params
if ($e){throw $e}



Loading