Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
not-scripter authored Mar 9, 2024
1 parent 63901f5 commit 6971603
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,20 @@
name: CI


on: [push, workflow_dispatch]


jobs:

build:


runs-on: windows-latest


steps:

- name: Download

run: Invoke-WebRequest https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip -OutFile ngrok.zip

- name: Extract

run: Expand-Archive ngrok.zip

- name: Auth

run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN

env:

NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}

- name: Enable TS

run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0

- run: Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

- run: Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 1

- run: Set-LocalUser -Name "runneradmin" -Password (ConvertTo-SecureString -AsPlainText "P@ssw0rd!" -Force)

- name: Create Tunnel

run: .\ngrok\ngrok.exe tcp 3389

build:
runs-on: windows-latest
steps:
– name: Download
run: Invoke-WebRequest https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-windows-amd64.zip -OutFile ngrok.zip
– name: Extract
run: Expand-Archive ngrok.zip
– name: Auth
run: .\ngrok\ngrok.exe authtoken $Env:NGROK_AUTH_TOKEN
env:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
– name: Enable TS
run: Set-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server’-name “fDenyTSConnections” -Value 0
– run: Enable-NetFirewallRule -DisplayGroup “Remote Desktop”
– run: Set-ItemProperty -Path ‘HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp’ -name “UserAuthentication” -Value 1
– run: Set-LocalUser -Name “runneradmin” -Password (ConvertTo-SecureString -AsPlainText “P@ssw0rd!” -Force)
– name: Create Tunnel run: .\ngrok\ngrok.exe tcp 3389

0 comments on commit 6971603

Please sign in to comment.