Skip to content

Commit 841a567

Browse files
committed
fix(action): allow merging cpython on existing branch
1 parent 9c34230 commit 841a567

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/py39-sync-cpython.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
VERSION: "3.9"
15+
BRANCH: "cron/sync/3.9"
1516
steps:
1617
- uses: actions/checkout@v2
1718
with:
1819
ref: ${{ env.VERSION }}
1920

21+
- name: Get the changes on branch (if exists)
22+
continue-on-error: true
23+
run: |
24+
git fetch origin ${{ env.BRANCH }}:${{ env.BRANCH }}
25+
git reset --hard ${{ env.BRANCH }}
26+
2027
- name: Set env
2128
run: echo "LATEST_COMMIT_ID=$(git ls-remote https://github.com/python/CPython.git $VERSION | head -c 8)" >> $GITHUB_ENV
2229

@@ -41,8 +48,8 @@ jobs:
4148
committer: GitHub <noreply@github.com>
4249
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
4350
base: ${{ env.VERSION }}
44-
branch: cron/sync/${{ env.VERSION }}
45-
delete-branch: true
51+
branch: ${{ env.BRANCH }}
52+
delete-branch: false
4653
title: 'Sync with CPython ${{ env.VERSION }}'
4754
body: |
4855
Sync with CPython ${{ env.VERSION }}

0 commit comments

Comments
 (0)