Skip to content

Commit

Permalink
GHA: Removed double execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Henrik Wiesner committed Oct 23, 2024
1 parent 9847c5e commit b0e35d4
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build_wsl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,26 @@ jobs:
runs-on: ${{ matrix.os }}
steps:

- name: Download and verify WinRM
- name: Setup WinRM and Password (checksum verified)
shell: powershell
run: |
Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "Ansible_password123!" -Force)
New-NetFirewallRule -DisplayName "ALLOW TCP PORT 5986" -Direction inbound -Profile Any -Action Allow -LocalPort 5986 -Protocol TCP
Invoke-WebRequest https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\ConfigureRemotingForAnsible.ps1
$expectedChecksum = "EBA72DF06E3E77709595F75D1D5B4D95B06602429DD2A3F7867406DF875B0C70"
$expectedChecksum = "EBA72DF06E3E77709595F75D1D5B4D95B06602429DD2A3F7867406DF875B0C70 "
$actualChecksum = Get-FileHash -Path ".\ConfigureRemotingForAnsible.ps1" -Algorithm SHA256 | Select-Object -ExpandProperty Hash
if ($actualChecksum -ne $expectedChecksum) {
Write-Output "Checksum mismatch"
Write-Output "Actual Checksum: $actualChecksum"
Write-Output "Expect Checksum: $expectedChecksum"
exit 1
} else {
.\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
.\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck
}
- name: Setup WinRM and Password
shell: powershell
run: |
Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "Ansible_password123!" -Force)
New-NetFirewallRule -DisplayName "ALLOW TCP PORT 5986" -Direction inbound -Profile Any -Action Allow -LocalPort 5986 -Protocol TCP
Invoke-WebRequest https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 -OutFile .\ConfigureRemotingForAnsible.ps1
.\ConfigureRemotingForAnsible.ps1 -CertValidityDays 9999
.\ConfigureRemotingForAnsible.ps1 -EnableCredSSP
.\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert
.\ConfigureRemotingForAnsible.ps1 -SkipNetworkProfileCheck
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- uses: Vampire/setup-wsl@6f87de3102a29ac6b92800f33bf1e8d9164ac0a1 # v3.1.1
Expand Down

0 comments on commit b0e35d4

Please sign in to comment.