|
1 | | -name: python-3.14-sync-with-cpython |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - "3.14" |
7 | | - schedule: |
8 | | - - cron: "0 0 * * *" |
9 | | - |
10 | | -jobs: |
11 | | - sync: |
12 | | - runs-on: ubuntu-latest |
13 | | - env: |
14 | | - VERSION: "3.14" |
15 | | - BRANCH: "cron/sync/3.14" |
16 | | - steps: |
17 | | - - uses: actions/checkout@v5 |
18 | | - with: |
19 | | - ref: ${{ env.VERSION }} |
20 | | - |
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 | | -
|
27 | | - - name: Set env |
28 | | - run: echo "LATEST_COMMIT_ID=$(git ls-remote https://github.com/python/CPython.git $VERSION | head -c 8)" >> $GITHUB_ENV |
29 | | - |
30 | | - - name: Install Dependencies |
31 | | - run: sudo apt-get install gettext |
32 | | - |
33 | | - - name: Install uv |
34 | | - uses: astral-sh/setup-uv@v7 |
35 | | - |
36 | | - - name: Sync with CPython |
37 | | - run: make clone merge rm_cpython wrap |
38 | | - |
39 | | - - uses: actions/create-github-app-token@v2 |
40 | | - id: app-token |
41 | | - with: |
42 | | - app-id: ${{ secrets.APP_ID }} |
43 | | - private-key: ${{ secrets.APP_PRIVATE_KEY }} |
44 | | - |
45 | | - - name: Create Pull Request |
46 | | - id: cpr |
47 | | - uses: peter-evans/create-pull-request@v6 |
48 | | - with: |
49 | | - token: ${{ steps.app-token.outputs.token }} |
50 | | - commit-message: sync with cpython ${{ env.LATEST_COMMIT_ID }} |
51 | | - committer: GitHub <noreply@github.com> |
52 | | - author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
53 | | - base: ${{ env.VERSION }} |
54 | | - branch: ${{ env.BRANCH }} |
55 | | - delete-branch: false |
56 | | - title: "Sync with CPython ${{ env.VERSION }}" |
57 | | - body: | |
58 | | - Sync with CPython ${{ env.VERSION }} |
59 | | - draft: true |
60 | | - labels: | |
61 | | - sync-cpython |
62 | | - automation |
63 | | -
|
64 | | - - name: Check outputs |
65 | | - run: | |
66 | | - echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
67 | | - echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
| 1 | +name: python-3.14-sync-with-cpython |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - "3.14" |
| 7 | + schedule: |
| 8 | + - cron: "0 0 * * *" |
| 9 | + |
| 10 | +jobs: |
| 11 | + sync: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + env: |
| 14 | + VERSION: "3.14" |
| 15 | + BRANCH: "cron/sync/3.14" |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v5 |
| 18 | + with: |
| 19 | + ref: ${{ env.VERSION }} |
| 20 | + |
| 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 | +
|
| 27 | + - name: Set env |
| 28 | + run: echo "LATEST_COMMIT_ID=$(git ls-remote https://github.com/python/CPython.git $VERSION | head -c 8)" >> $GITHUB_ENV |
| 29 | + |
| 30 | + - name: Install Dependencies |
| 31 | + run: sudo apt-get install gettext |
| 32 | + |
| 33 | + - name: Install uv |
| 34 | + uses: astral-sh/setup-uv@v7 |
| 35 | + |
| 36 | + - name: Sync with CPython |
| 37 | + run: make clone merge rm_cpython wrap |
| 38 | + |
| 39 | + - uses: actions/create-github-app-token@v2 |
| 40 | + id: app-token |
| 41 | + with: |
| 42 | + app-id: ${{ secrets.APP_ID }} |
| 43 | + private-key: ${{ secrets.APP_PRIVATE_KEY }} |
| 44 | + |
| 45 | + - name: Create Pull Request |
| 46 | + id: cpr |
| 47 | + uses: peter-evans/create-pull-request@v6 |
| 48 | + with: |
| 49 | + token: ${{ steps.app-token.outputs.token }} |
| 50 | + commit-message: sync with cpython ${{ env.LATEST_COMMIT_ID }} |
| 51 | + committer: GitHub <noreply@github.com> |
| 52 | + author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
| 53 | + base: ${{ env.VERSION }} |
| 54 | + branch: ${{ env.BRANCH }} |
| 55 | + delete-branch: false |
| 56 | + title: "Sync with CPython ${{ env.VERSION }}" |
| 57 | + body: | |
| 58 | + Sync with CPython ${{ env.VERSION }} |
| 59 | + draft: true |
| 60 | + labels: | |
| 61 | + sync-cpython |
| 62 | + automation |
| 63 | +
|
| 64 | + - name: Check outputs |
| 65 | + run: | |
| 66 | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |
| 67 | + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
0 commit comments