From 60a3baf27554ca0416468222ec482ee774b75709 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 5 Nov 2026 13:49:57 +0100 Subject: [PATCH 1/2] Use shared promote workflow We added the shared workflow in https://github.com/OpenVoxProject/shared-actions/pull/184 Signed-off-by: Tim Meusel --- .github/workflows/promote.yml | 87 ++++------------------------------- 1 file changed, 8 insertions(+), 79 deletions(-) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 0e2df30ff..085fa1a4f 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -19,84 +19,13 @@ on: permissions: {} -env: - GIT_AUTHOR_NAME: OpenVoxProjectBot - GIT_AUTHOR_EMAIL: 215568489+OpenVoxProjectBot@users.noreply.github.com - GIT_COMMITTER_NAME: OpenVoxProjectBot - GIT_COMMITTER_EMAIL: 215568489+OpenVoxProjectBot@users.noreply.github.com - SSH_AUTH_SOCK: /tmp/ssh_agent.sock - jobs: promote: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ inputs.branch }} - token: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} - - - name: Add SSH key - run: | - mkdir -p ~/.ssh - echo "${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }}" > ~/.ssh/github_actions - chmod 600 ~/.ssh/github_actions - ssh-agent -a $SSH_AUTH_SOCK > /dev/null - ssh-add ~/.ssh/github_actions - - - name: Setup git - run: | - git config --global user.email "$GIT_AUTHOR_EMAIL" - git config --global user.name "$GIT_AUTHOR_NAME" - git config --global gpg.format ssh - git config --global user.signingkey ~/.ssh/github_actions - git config --global commit.gpgsign true - git config --global tag.gpgsign true - - - name: Validate component exists - run: | - component="${{ inputs.component }}" - if [[ ! -f "packaging/configs/components/${component}.json" ]]; then - echo "::error::Could not find packaging/configs/components/${component}.json" - exit 1 - fi - - - name: Generate component JSON - id: generate - run: | - component="${{ inputs.component }}" - ref="${{ inputs.ref }}" - - if [[ "${component}" == "puppet-runtime" ]]; then - # Munge the ref: replace - with . - munged="${ref//-/.}" - json="{\"location\":\"https://s3.osuosl.org/openvox-artifacts/${component}/${ref}/\",\"version\":\"${munged}\"}" - else - json="{\"url\":\"https://github.com/openvoxproject/${component}.git\",\"ref\":\"${ref}\"}" - fi - - echo "json=${json}" >> "$GITHUB_OUTPUT" - echo "Generated JSON: ${json}" - - - name: Write component JSON - run: | - component="${{ inputs.component }}" - echo '${{ steps.generate.outputs.json }}' > "packaging/configs/components/${component}.json" - echo "Wrote packaging/configs/components/${component}.json:" - cat "packaging/configs/components/${component}.json" - - - name: Create Pull Request - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 - with: - 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 }}>' - signoff: true - base: ${{ inputs.branch }} - body: | - Automated promotion of ${{ inputs.component }} to ref ${{ inputs.ref }}. + uses: OpenVoxProject/shared-actions/.github/workflows/promote.yml@main + with: + component: ${{ inputs.component }} + ref: ${{ inputs.ref }} + branch: ${{ inputs.branch }} + secrets: + github_pat: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} + ssh_private_key: ${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }} From 5d42bc0de0ee33da31b756dd8ebc69de36c73567 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 5 Nov 2026 13:52:51 +0100 Subject: [PATCH 2/2] simplify branch selection Signed-off-by: Tim Meusel --- .github/workflows/promote.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 085fa1a4f..e7613989f 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -12,10 +12,14 @@ on: required: true type: string branch: - description: 'Branch to promote to (defaults to main)' + description: 'Branch to promote to' required: false default: 'main' - type: string + type: choice + options: + - main + - '5.x' + permissions: {}