Open PRs from CSA branches #111
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Open PRs from CSA branches | |
| on: | |
| workflow_run: | |
| workflows: ["Daily Sync of CSA branches"] | |
| types: | |
| - completed | |
| workflow_dispatch: | |
| jobs: | |
| open-pr: | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - local_branch: csa | |
| pr_branch: automation/update_main | |
| base_branch: main | |
| title: "Sync csa branch with main" | |
| body: | | |
| This PR syncs the csa branch with the main branch. | |
| **PR MUST BE MERGED WITH MERGE COMMIT - ADMIN MUST ENABLE THE OPTION** | |
| - local_branch: csa-v1.5-branch | |
| pr_branch: automation/update_release_2.8-1.5 | |
| base_branch: release_2.8-1.5 | |
| title: "Sync csa-v1.5-branch branch with release_2.8-1.5" | |
| body: | | |
| This PR syncs the csa-v1.5-branch branch with the release_2.8-1.5 branch. | |
| **PR MUST BE MERGED WITH MERGE COMMIT - ADMIN MUST ENABLE THE OPTION** | |
| steps: | |
| - name: Generate token for the workflow | |
| id: generate_token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ vars.SILABSSW_MATTER_CI_BOT_APP_ID }} | |
| private-key: | |
| ${{ secrets.SILABSSW_MATTER_CI_BOT_APP_PRIVATE_KEY }} | |
| - name: Mask the generated token | |
| run: echo "::add-mask::${{ steps.generate_token.outputs.token }}" | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ matrix.base_branch }} | |
| persist-credentials: false | |
| - name: Checkout ${{ matrix.local_branch }} | |
| run: | | |
| git fetch origin ${{ matrix.local_branch }}:${{ matrix.local_branch }} | |
| git reset --hard ${{ matrix.local_branch }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| branch: ${{ matrix.pr_branch }} | |
| base: ${{ matrix.base_branch }} | |
| title: ${{ matrix.title }} | |
| body: ${{ matrix.body }} | |
| token: ${{ steps.generate_token.outputs.token }} | |
| labels: | |
| changing-git-submodules-on-purpose, sl-require-admin-action | |