Skip to content

Commit 6438897

Browse files
author
James Brundage
committed
Updating action (pulling just before push) (#163)
1 parent ec7463c commit 6438897

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,9 @@ runs:
190190
191191
$branchName = git rev-parse --abrev-ref HEAD
192192
if (-not $branchName) {
193-
194193
return
195194
}
196195
197-
git pull | Out-Host
198-
199196
$PipeScriptStart = [DateTime]::Now
200197
if ($PipeScript) {
201198
Invoke-PipeScript -Command $PipeScript |
@@ -231,11 +228,15 @@ runs:
231228
232229
git commit -m $ExecutionContext.SessionState.InvokeCommand.ExpandString($CommitMessage)
233230
}
231+
232+
234233
235234
$checkDetached = git symbolic-ref -q HEAD
236235
if (-not $LASTEXITCODE) {
236+
"::notice::Pulling Changes" | Out-Host
237+
git pull | Out-Host
237238
"::notice::Pushing Changes" | Out-Host
238-
git push
239+
git push | Out-Host
239240
"Git Push Output: $($gitPushed | Out-String)"
240241
} else {
241242
"::notice::Not pushing changes (on detached head)" | Out-Host

0 commit comments

Comments
 (0)