Skip to content

Commit 5ea3195

Browse files
committed
chore: fix remote push
1 parent 25069e7 commit 5ea3195

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/combine-dependabot-updates.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323
token: "${{ secrets.RENKUBOT_GITHUB_TOKEN }}"
24+
ref: ${{ inputs.branch_name }}
2425
- name: Set up Python
2526
uses: actions/setup-python@v4
2627
with:
@@ -39,10 +40,11 @@ jobs:
3940
git config --global --add user.email "[email protected]"
4041
- name: Setup local branch and merge tool
4142
run: |
42-
git branch --track "${{ inputs.branch_name }}" "origin/${{ inputs.branch_name }}" || git checkout "${{ inputs.branch_name }}"
43+
git branch --track "${{ inputs.branch_name }}" "origin/${{ inputs.branch_name }}" || ( git checkout "${{ inputs.branch_name }}" && git branch -u "origin/${{ inputs.branch_name }}" )
44+
git pull
4345
echo "poetry.lock merge=ours" >> .git/info/attributes
4446
git config merge.ours.driver true
45-
git merge --no-edit develop
47+
git merge --no-edit "origin/${{ inputs.target_branch }}"
4648
- name: Merge PRs
4749
id: merge_prs
4850
env:
@@ -75,7 +77,8 @@ jobs:
7577
poetry lock
7678
git add -A
7779
git commit -m "update lock file" --no-verify
78-
git push origin "${{ inputs.branch_name }}"
80+
git status
81+
git push
7982
echo "pr_body=$pr_body" >> $GITHUB_OUTPUT
8083
- name: Create Pull Request
8184
uses: actions/github-script@v6
@@ -88,7 +91,7 @@ jobs:
8891
owner,
8992
repo,
9093
head: '${{ inputs.branch_name }}',
91-
base: '${{ github.event.inputs.target_branch }}',
94+
base: '${{ inputs.target_branch }}',
9295
body: '${{ steps.merge_prs.outputs.pr_body }}'
9396
});
9497
github.rest.issues.addLabels({

0 commit comments

Comments
 (0)