Add Windows PowerShell dev workflow
build-push / docker (push) Successful in 4m7s

This commit is contained in:
GHStaK
2026-03-17 15:47:01 +09:00
parent 75f1bb360c
commit 139e8f8781
8 changed files with 606 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
param(
[string]$Remote = "origin",
[string]$Branch = "",
[switch]$SetUpstream
)
Set-StrictMode -Version Latest
$ErrorActionPreference = "Stop"
. (Join-Path $PSScriptRoot "dev-tools.ps1")
Use-LocalTooling
$credential = Import-GitCredential
if (-not $Branch) {
$Branch = (& git branch --show-current).Trim()
}
if (-not $Branch) {
throw "현재 브랜치를 찾지 못했습니다."
}
$pair = "{0}:{1}" -f $credential.Username, $credential.Password
$token = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes($pair))
$gitArgs = @("-c", "http.extraheader=AUTHORIZATION: Basic $token", "push")
if ($SetUpstream) {
$gitArgs += @("--set-upstream", $Remote, $Branch)
} else {
$gitArgs += @($Remote, $Branch)
}
Write-Step "git push $Remote $Branch"
& git @gitArgs