Skip to content

Commit ffce561

Browse files
committed
tests new git diff
1 parent eb626e2 commit ffce561

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/actions/push-changes/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ runs:
4545
- name: Check for changes in ${{ inputs.working-directory }}
4646
shell: bash
4747
run: |
48-
git diff --staged --quiet -- ${{ inputs.working-directory }}
48+
git diff ${{ github.head_ref || github.ref }} origin/origin/${{ inputs.target-branch } --staged --quiet} -- ${{ inputs.working-directory }}
4949
continue-on-error: true
5050
id: check-diff
5151
- name: Push changes to ${{ inputs.target-branch }}, if exists
@@ -59,7 +59,7 @@ runs:
5959
run: |
6060
git stash push -- ${{ inputs.working-directory }}
6161
git fetch origin
62-
git checkout -b ${{ inputs.target-branch }} origin/${{ inputs.target-branch }}
62+
git checkout -b ${{ inputs.target-branch }} origin/${{ inputs.target-branch }} --force
6363
git stash pop
6464
git commit -m'${{ inputs.commit-message }}' -- ${{ inputs.working-directory }}
6565
git push

0 commit comments

Comments
 (0)