File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
.github/actions/push-changes Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,13 @@ runs:
4242 git config --global user.name "${{ github.actor }}"
4343 git config --global user.email "${{ github.actor }}@users.noreply.github.com"
4444 git add -- ${{ inputs.working-directory }}
45+ git stash push --keep-index -- ${{ inputs.working-directory }}
4546 - name : Check for changes in ${{ inputs.working-directory }}
4647 shell : bash
4748 run : |
48- git diff ${{ github.head_ref || github.ref }} origin/${{ inputs.target-branch }} --staged --quiet -- ${{ inputs.working-directory }}
49+ git checkout -b ${{ inputs.target-branch }} origin/${{ inputs.target-branch }} --force
50+ git stash apply
51+ git diff --staged --quiet -- ${{ inputs.working-directory }}
4952 continue-on-error : true
5053 id : check-diff
5154 - name : Push changes to ${{ inputs.target-branch }}, if exists
5760 if : ${{ steps.check-diff.outcome == 'failure' }}
5861 shell : bash
5962 run : |
60- git stash push -- ${{ inputs.working-directory }}
61- git fetch origin
6263 git checkout -b ${{ inputs.target-branch }} origin/${{ inputs.target-branch }} --force
6364 git stash pop
6465 git commit -m'${{ inputs.commit-message }}' -- ${{ inputs.working-directory }}
You can’t perform that action at this time.
0 commit comments