Skip to content

Commit

Permalink
Update cf-win.msvc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mguludag authored May 20, 2024
1 parent 54e2cbb commit 631c7d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cf-win.msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
$URLString = $null
Start-Process -FilePath "cloudflared.exe" -ArgumentList "--url http://localhost:10240" -RedirectStandardOutput $pwd\out.txt -RedirectStandardError $pwd\err.txt
Start-Sleep -s 10
Get-Content $pwd\out.txt | ForEach-Object { if($_ -match "https://"){ $URLString = ((Select-String '(http[s]?)(:\/\/)([^\s,]+)(?=")' -Input $_).Matches.Value) }}
Get-Content $pwd\err.txt | ForEach-Object { if($_ -match "https://"){ $URLString = ((Select-String '(http[s]?)(:\/\/)([^\s,]+)(?=")' -Input $_).Matches.Value) }}
Get-Content $pwd\out.txt | ForEach-Object { if($_ -match "https://"){ $str = ((Select-String '(ftp|ftps|sftp|http|https)://(\S)*' -Input $_).Matches.Value); if($str.EndsWith('com')){ $URLString = $str } }}
Get-Content $pwd\err.txt | ForEach-Object { if($_ -match "https://"){ $str = ((Select-String '(ftp|ftps|sftp|http|https)://(\S)*' -Input $_).Matches.Value); if($str.EndsWith('com')){ $URLString = $str } }}
if($URLString){ C:\send_telegram.ps1 ${{ secrets.TG_TOKEN }} ${{ secrets.TG_CHAT_ID }} $URLString }
Start-Sleep -s 21600
}else{
Expand Down

0 comments on commit 631c7d4

Please sign in to comment.