-
-
Notifications
You must be signed in to change notification settings - Fork 275
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Version of the Action
v4.9.0
Describe the bug
Creates a new branch even if the remote with the same name exists.
Switched to a new branch 'automatic-sync'
INPUT_FILE_PATTERN: .editorconfig
To https://github.com/<repo>
! [rejected] HEAD -> automatic-sync (non-fast-forward)
error: failed to push some refs to 'https://github.com/<repo>'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
To Reproduce
Steps to reproduce the behavior:
- Give a new branch name and commit some changes
- Run the same workflow a second time
Expected behavior
Needs to check if the remote branch exists, compare the difference, and commit only if a change is found.
Used Workflow
name: sync template
on: push
jobs:
check-version-change:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v2
- name: Copy file
run: ***does something*******
- name: commit and push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit: "Apply automatic changes"
branch: "automatic-sync"
file_pattern: ".editorconfig"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working