|
1 | 1 | name: Build clang runtime builtins
|
| 2 | + |
2 | 3 | on:
|
3 | 4 | workflow_dispatch:
|
| 5 | + inputs: |
| 6 | + target_sdk_branch: |
| 7 | + type: string |
| 8 | + required: false |
| 9 | + default: 'master' |
| 10 | + create_pr: |
| 11 | + type: boolean |
| 12 | + required: false |
| 13 | + default: false |
| 14 | + |
4 | 15 | # TODO: remove this next line before merging!
|
5 | 16 | push:
|
6 | 17 |
|
| 18 | +env: |
| 19 | + GIT_USER_EMAIL: '[email protected]' |
| 20 | + GIT_USER_NAME: 'SDKLibsUpdaterGithub' |
| 21 | + UPDATE_BRANCH: 'sdk_libs_update' |
| 22 | + |
7 | 23 | jobs:
|
8 | 24 | build:
|
9 | 25 | runs-on: ubuntu-latest
|
|
22 | 38 | - uses: actions/checkout@v4
|
23 | 39 | with:
|
24 | 40 | # TODO: remove this next line before merging!
|
25 |
| - ref: feat/apa/clangrt |
| 41 | + ref: feat/regain_control_over_libs |
26 | 42 | sparse-checkout: |
|
27 | 43 | tools/build_clangrt_builtins.sh
|
28 | 44 | sparse-checkout-cone-mode: false
|
|
43 | 59 | name: arch
|
44 | 60 | pattern: arch-*
|
45 | 61 | delete-merged: true
|
| 62 | + |
| 63 | + pr_create: |
| 64 | + needs: merge |
| 65 | + runs-on: ubuntu-latest |
| 66 | + if: ${{ success() && inputs.create_pr }} |
| 67 | + continue-on-error: true |
| 68 | + steps: |
| 69 | + - name: Clone repository |
| 70 | + uses: actions/checkout@v4 |
| 71 | + with: |
| 72 | + # by default the action uses fetch-depth = 1, which creates |
| 73 | + # shallow repositories from which we can't push |
| 74 | + fetch-depth: 0 |
| 75 | + ref: ${{ inputs.target_sdk_branch }} |
| 76 | + |
| 77 | + - name: Download Binaries artifact |
| 78 | + uses: actions/download-artifact@v4 |
| 79 | + with: |
| 80 | + name: arch |
| 81 | + |
| 82 | + - name: PR creation |
| 83 | + env: |
| 84 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 85 | + run: | |
| 86 | + git config --global user.email ${{ env.GIT_USER_EMAIL }} |
| 87 | + git config --global user.name ${{ env.GIT_USER_NAME }} |
| 88 | + git switch --create ${{ env.UPDATE_BRANCH }} |
| 89 | + git add -A . |
| 90 | + git commit -m 'Updating static SDK libraries' |
| 91 | + git push -u origin ${{ env.UPDATE_BRANCH }} |
| 92 | + gh pr create -B ${{ inputs.target_sdk_branch }} --title '[SDK_LIBS_UPDATE] Updating static SDK libraries' --body 'Created by Github workflow "${{ github.workflow }}", job "${{ github.job }}", run "${{ github.run_id }}".' |
0 commit comments