File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -122,12 +122,9 @@ if (-not $env:GITHUB_WORKSPACE) { throw "No GitHub workspace" }
122122
123123$branchName = git rev- parse -- abrev- ref HEAD
124124if (-not $branchName ) {
125-
126125 return
127126}
128127
129- git pull | Out-Host
130-
131128$PipeScriptStart = [DateTime ]::Now
132129if ($PipeScript ) {
133130 Invoke-PipeScript - Command $PipeScript |
@@ -163,11 +160,15 @@ if ($CommitMessage -or $anyFilesChanged) {
163160
164161 git commit - m $ExecutionContext.SessionState.InvokeCommand.ExpandString ($CommitMessage )
165162 }
163+
164+
166165
167166 $checkDetached = git symbolic- ref - q HEAD
168167 if (-not $LASTEXITCODE ) {
168+ " ::notice::Pulling Changes" | Out-Host
169+ git pull | Out-Host
169170 " ::notice::Pushing Changes" | Out-Host
170- git push
171+ git push | Out-Host
171172 " Git Push Output: $ ( $gitPushed | Out-String ) "
172173 } else {
173174 " ::notice::Not pushing changes (on detached head)" | Out-Host
You can’t perform that action at this time.
0 commit comments