Skip to content

Commit

Permalink
24
Browse files Browse the repository at this point in the history
  • Loading branch information
collinlucke committed Nov 28, 2024
1 parent 6bd46c9 commit 5c4ce39
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,37 @@ jobs:
run: |
Start-Process -FilePath "docker" -ArgumentList "tag baphomet-server:latest collinlucke/baphomet-server:latest" -Verb RunAs
# - name: Push Docker Images with Elevated Privileges
# shell: powershell
# run: Start-Process -FilePath "powershell.exe" -ArgumentList "-Command docker-compose -f docker-compose.yml push --verbose" -Verb RunAs

- name: Push Docker Images with Logging
- name: Push Docker Images with Elevated Privileges
shell: powershell
run: |
Start-Process -FilePath "powershell.exe" -ArgumentList "-Command docker-compose -f docker-compose.yml push" -Verb RunAs -Wait -PassThru | ForEach-Object {
$_.StandardOutput.ReadToEnd()
$_.StandardError.ReadToEnd()
}
if ($LASTEXITCODE -ne 0) {
Write-Output "Docker push failed with exit code $LASTEXITCODE"
exit $LASTEXITCODE
$process = Start-Process -FilePath "powershell.exe" -ArgumentList "-Command docker-compose -f docker-compose.yml push" -Verb RunAs -Wait -PassThru
$process.WaitForExit()
$stdout = $process.StandardOutput.ReadToEnd()
$stderr = $process.StandardError.ReadToEnd()
Write-Output "Standard Output: $stdout"
Write-Output "Standard Error: $stderr"
if ($process.ExitCode -ne 0) {
Write-Output "Docker push failed with exit code $($process.ExitCode)"
exit $process.ExitCode
} else {
Write-Output "Docker push completed successfully."
}
# - name: Push Docker Images with Logging
# shell: powershell
# run: |
# Start-Process -FilePath "powershell.exe" -ArgumentList "-Command docker-compose -f docker-compose.yml push" -Verb RunAs -Wait -PassThru | ForEach-Object {
# $_.StandardOutput.ReadToEnd()
# $_.StandardError.ReadToEnd()
# }
# if ($LASTEXITCODE -ne 0) {
# Write-Output "Docker push failed with exit code $LASTEXITCODE"
# exit $LASTEXITCODE
# } else {
# Write-Output "Docker push completed successfully."
# }


deploy:
Expand Down

0 comments on commit 5c4ce39

Please sign in to comment.