workflows enhanced MySQL check service status step

This commit is contained in:
silverqx
2023-01-23 15:16:03 +01:00
parent c48264b781
commit 8e297a8218
4 changed files with 12 additions and 4 deletions
+3 -1
View File
@@ -169,6 +169,8 @@ jobs:
- name: MySQL check service status
run: |
$serviceName = 'MySQL'
Write-Output '::group::Get-Service'
$mysqlService = Get-Service MySQL
Write-Output $mysqlService
@@ -176,7 +178,7 @@ jobs:
Write-Output '::group::Service running check'
$mysqlService.status.ToString() -ceq 'Running' -or `
$(throw 'MySQL service is not running') > $null
$(throw "$serviceName service is not running") > $null
Write-Output '::endgroup::'
Write-Output '::group::Ping'
+3 -1
View File
@@ -153,6 +153,8 @@ jobs:
- name: MySQL check service status
run: |
$serviceName = 'MySQL'
Write-Output '::group::Get-Service'
$mysqlService = Get-Service MySQL
Write-Output $mysqlService
@@ -160,7 +162,7 @@ jobs:
Write-Output '::group::Service running check'
$mysqlService.status.ToString() -ceq 'Running' -or `
$(throw 'MySQL service is not running') > $null
$(throw "$serviceName service is not running") > $null
Write-Output '::endgroup::'
Write-Output '::group::Ping'
+3 -1
View File
@@ -169,6 +169,8 @@ jobs:
- name: MySQL check service status
run: |
$serviceName = 'MySQL'
Write-Output '::group::Get-Service'
$mysqlService = Get-Service MySQL
Write-Output $mysqlService
@@ -176,7 +178,7 @@ jobs:
Write-Output '::group::Service running check'
$mysqlService.status.ToString() -ceq 'Running' -or `
$(throw 'MySQL service is not running') > $null
$(throw "$serviceName service is not running") > $null
Write-Output '::endgroup::'
Write-Output '::group::Ping'
+3 -1
View File
@@ -187,6 +187,8 @@ jobs:
- name: MySQL check service status
run: |
$serviceName = 'MySQL'
Write-Output '::group::Get-Service'
$mysqlService = Get-Service MySQL
Write-Output $mysqlService
@@ -194,7 +196,7 @@ jobs:
Write-Output '::group::Service running check'
$mysqlService.status.ToString() -ceq 'Running' -or `
$(throw 'MySQL service is not running') > $null
$(throw "$serviceName service is not running") > $null
Write-Output '::endgroup::'
Write-Output '::group::Ping'