Skip to content

Commit aa36a7f

Browse files
committed
chore: fix combine dependabot action
1 parent bb0a39a commit aa36a7f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ jobs:
2121
with:
2222
fetch-depth: 0
2323
token: "${{ secrets.RENKUBOT_GITHUB_TOKEN }}"
24-
ref: ${{ inputs.branch_name }}
24+
ref: develop
25+
- name: Setup local branch and merge tool
26+
run: |
27+
git checkout -b "${{ inputs.branch_name }}" || ( git checkout "${{ inputs.branch_name }}" && git branch -u "origin/${{ inputs.branch_name }}" && git pull && git merge develop)
28+
echo "poetry.lock merge=ours" >> .git/info/attributes
29+
git config merge.ours.driver true
30+
git merge --no-edit "origin/${{ inputs.target_branch }}"
2531
- name: Set up Python
2632
uses: actions/setup-python@v4
2733
with:
@@ -38,13 +44,6 @@ jobs:
3844
run: |
3945
git config --global --add user.name "Renku Bot"
4046
git config --global --add user.email "[email protected]"
41-
- name: Setup local branch and merge tool
42-
run: |
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
45-
echo "poetry.lock merge=ours" >> .git/info/attributes
46-
git config merge.ours.driver true
47-
git merge --no-edit "origin/${{ inputs.target_branch }}"
4847
- name: Merge PRs
4948
id: merge_prs
5049
env:
@@ -63,6 +62,9 @@ jobs:
6362
if git merge --no-edit "origin/${branch_arr[0]}"; then
6463
pr_body="$pr_body\n- #${branch_arr[1]}"
6564
else
65+
git merge --abort
66+
git clean -fdx
67+
git reset --hard
6668
failed+=(${branch_arr[1]})
6769
fi
6870
done
@@ -78,7 +80,7 @@ jobs:
7880
git add -A
7981
git commit -m "update lock file" --no-verify
8082
git status
81-
git push
83+
git push origin "${{ inputs.branch_name }}"
8284
echo "pr_body=$pr_body" >> $GITHUB_OUTPUT
8385
- name: Create Pull Request
8486
uses: actions/github-script@v6

0 commit comments

Comments
 (0)