From 4761898d7ffab8fc32bebef448668059c7206053 Mon Sep 17 00:00:00 2001 From: nmburgan <13688219+nmburgan@users.noreply.github.com> Date: Thu, 4 Dec 2025 11:48:23 -0800 Subject: [PATCH] Use PR for promotion action Due to the requirement for tests to pass, pushing directly to main doesn't really work, even with branch protection bypass rules set up. --- .github/workflows/promote.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 3b424f2cdb..a62850ccb5 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -17,8 +17,7 @@ on: default: 'main' type: string -permissions: - contents: write +permissions: {} env: GIT_AUTHOR_NAME: OpenVoxProjectBot @@ -86,12 +85,17 @@ jobs: echo "Wrote packaging/configs/components/${component}.json:" cat "packaging/configs/components/${component}.json" - - name: Commit component promotion - uses: stefanzweifel/git-auto-commit-action@v6 + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 with: - commit_user_name: ${{ env.GIT_COMMITTER_NAME }} - commit_user_email: ${{ env.GIT_COMMITTER_EMAIL }} - commit_author: '${{ env.GIT_AUTHOR_NAME }} <${{ env.GIT_AUTHOR_EMAIL }}>' - commit_message: "Promote ${{ inputs.component }} ${{ inputs.ref }}" - branch: ${{ inputs.branch }} - file_pattern: "packaging/configs/components/${{ inputs.component }}.json" + commit-message: "Promote ${{ inputs.component }} ${{ inputs.ref }}" + branch: "promote/${{ inputs.component }}/${{ inputs.ref }}" + delete-branch: true + title: "Promote ${{ inputs.component }} ${{ inputs.ref }}" + token: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} + assignees: '${{ github.triggering_actor }}' + author: '${{ env.GIT_AUTHOR_NAME }} <${{ env.GIT_AUTHOR_EMAIL }}>' + committer: '${{ env.GIT_COMMITTER_NAME }} <${{ env.GIT_COMMITTER_EMAIL }}>' + base: ${{ inputs.branch }} + body: | + Automated promotion of ${{ inputs.component }} to ref ${{ inputs.ref }}.