From 84cf85ba54e4ed05ed5ad40629de2bef8e6206d5 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 5 Nov 2026 13:40:47 +0100 Subject: [PATCH 1/2] Use shared promote workflow We moved the logic to shared-actions: https://github.com/OpenVoxProject/shared-actions/pull/184 Signed-off-by: Tim Meusel --- .github/workflows/promote.yml | 82 +++++------------------------------ 1 file changed, 10 insertions(+), 72 deletions(-) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index fed19ddd7e..ce7c57d00d 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -24,75 +24,13 @@ permissions: {} jobs: promote: - runs-on: ubuntu-26.04 - steps: - - name: Checkout repository - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ inputs.branch }} - token: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} - fetch-depth: 0 # required for vanagon below to determine the openvox version - - - name: Setup git and SSH signing - id: git_identity - uses: OpenVoxProject/shared-actions/.github/actions/setup-git-ssh-signing@main - with: - ssh_private_key: ${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }} - - - 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|openssl-fips)$ ]]; 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: Install Ruby - uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0 - with: - ruby-version: ruby - bundler-cache: true - # downloads all required components and fails if one isn't available - # basically ensures our inputs.ref doesn't contain typos - - name: Validate Vanagon render - working-directory: packaging/ - run: bundle exec vanagon render openvox-agent el-10-x86_64 - - - name: Create Pull Request - uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1 - with: - commit-message: "Promote ${{ inputs.component }} ${{ inputs.ref }} into ${{ inputs.branch }}" - branch: "promote/${{ inputs.branch }}/${{ inputs.component }}/${{ inputs.ref }}" - delete-branch: true - title: "Promote ${{ inputs.component }} ${{ inputs.ref }} into ${{ inputs.branch }}" - token: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} - assignees: '${{ github.triggering_actor }}' - author: '${{ steps.git_identity.outputs.git_author_name }} <${{ steps.git_identity.outputs.git_author_email }}>' - committer: '${{ steps.git_identity.outputs.git_committer_name }} <${{ steps.git_identity.outputs.git_committer_email }}>' - signoff: true - base: ${{ inputs.branch }} - body: | - Automated promotion of ${{ inputs.component }} to ref ${{ inputs.ref }} in ${{ inputs.branch }}. + uses: OpenVoxProject/shared-actions/.github/workflows/promote.yml@main + with: + component: ${{ inputs.component }} + ref: ${{ inputs.ref }} + branch: ${{ inputs.branch }} + validate_command: bundle exec vanagon render openvox-agent el-10-x86_64 + validate_working_directory: packaging/ + secrets: + github_pat: ${{ secrets.OPENVOXBOT_COMMIT_AND_PRS }} + ssh_private_key: ${{ secrets.OPENVOXBOT_SSH_PRIVATE_KEY }} From 4b6daefb3bb024ed199e5d4230130ee9755ec1eb Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 5 Nov 2026 13:53:23 +0100 Subject: [PATCH 2/2] simplify branch selection Signed-off-by: Tim Meusel --- .github/workflows/promote.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index ce7c57d00d..091f1bec65 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -12,7 +12,7 @@ on: required: true type: string branch: - description: 'Branch to promote to (defaults to main)' + description: 'Branch to promote to' required: false default: 'main' type: choice