Merge pull request #4704 from microsoft/Dev #2541
Workflow file for this run
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
name: AzureCloud - Full-Circle - SC | |
on: [push] | |
jobs: | |
# This workflow contains a single job called "build" | |
FullCircle-SC: | |
# The type of runner that the job will run on | |
runs-on: windows-latest | |
# Only when run from the main repo | |
if: github.repository == 'microsoft/Microsoft365DSC' | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Install Microsoft365DSC | |
shell: powershell | |
run: | | |
winrm quickconfig -force | |
$source = './Modules/Microsoft365DSC/' | |
$destination = 'C:\Program Files\WindowsPowerShell\Modules' | |
Copy-Item -Path $source -Recurse -Destination $destination -Container -Force | |
Update-M365DSCDependencies | |
- name: Run ReverseDSC | |
shell: powershell | |
env: | |
PUBLIC_USERNAME: ${{ secrets.PUBLIC_USERNAME }} | |
PUBLIC_PASSWORD: ${{ secrets.PUBLIC_PASSWORD }} | |
run: | | |
Set-ExecutionPolicy Unrestricted -Force | |
Get-ChildItem 'C:\Program Files\WindowsPowerShell\Modules' -Recurse | Unblock-File | |
$CredPassword = ConvertTo-SecureString $env:PUBLIC_PASSWORD -AsPlainText -Force | |
$Credential = New-Object System.Management.Automation.PSCredential ($env:PUBLIC_USERNAME, $CredPassword) | |
$Credential.Password.MakeReadOnly() | |
Set-M365DSCTelemetryOption -Enabled $false | |
Export-M365DSCConfiguration -Credential $Credential -Path '.' -FileName 'ExtractedSC.ps1' -Workload 'SC' |