Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,49 @@ jobs:
project_name: ${{ matrix.project_name }}
branch: ${{ matrix.branch }}
secrets: inherit

promote:
needs:
- get_version
- build
runs-on: ubuntu-26.04
permissions: {}
strategy:
fail-fast: false
matrix:
include:
- repo: OpenVoxProject/openvox
branch: main
- repo: OpenVoxProject/openvox
branch: '8.x'
- repo: OpenVoxProject/openbolt
branch: main
steps:
- name: Trigger promote workflow in ${{ matrix.repo }} (${{ matrix.branch }})
id: dispatch
env:
GH_TOKEN: ${{ secrets.OPENVOXBOT_TRIGGER_WORKFLOWS }}
REPO: ${{ matrix.repo }}
BRANCH: ${{ matrix.branch }}
VERSION: ${{ needs.get_version.outputs.version }}
run: |
# return_run_details makes the API respond with the run id and URL
response=$(gh api --method POST \
"repos/${REPO}/actions/workflows/promote.yml/dispatches" \
-f ref=main \
-F return_run_details=true \
-f 'inputs[component]=puppet-runtime' \
-f "inputs[ref]=${VERSION}" \
-f "inputs[branch]=${BRANCH}")
run_id=$(jq -r '.workflow_run_id' <<< "${response}")
run_url=$(jq -r '.html_url' <<< "${response}")
echo "run_id=${run_id}" >> "$GITHUB_OUTPUT"
echo "Triggered ${run_url}"
echo "- [${REPO} (${BRANCH})](${run_url})" >> "$GITHUB_STEP_SUMMARY"

- name: Wait for promote workflow in ${{ matrix.repo }} (${{ matrix.branch }})
env:
GH_TOKEN: ${{ secrets.OPENVOXBOT_TRIGGER_WORKFLOWS }}
REPO: ${{ matrix.repo }}
RUN_ID: ${{ steps.dispatch.outputs.run_id }}
run: gh run watch "${RUN_ID}" --repo "${REPO}" --exit-status
Loading