diff --git a/.github/workflows/version_branch.yml b/.github/workflows/version_branch.yml index cb55333..c449819 100644 --- a/.github/workflows/version_branch.yml +++ b/.github/workflows/version_branch.yml @@ -44,6 +44,7 @@ concurrency: permissions: contents: write + pull-requests: write defaults: run: @@ -620,6 +621,49 @@ jobs: git push --set-upstream origin "${BRANCH_NAME}" + - name: Create pull request + if: ${{ env.REPORT_ONLY != 'true' }} + env: + GH_TOKEN: ${{ github.token }} + run: | + source "$CI_HELPERS" + moko_init "Create pull request" + + if [[ -z "${BRANCH_NAME:-}" ]]; then + echo "[FATAL] BRANCH_NAME not set." >&2 + exit 2 + fi + + PR_TITLE="Version branch ${NEW_VERSION}" + if [[ -n "${VERSION_TEXT}" ]]; then + PR_TITLE="${PR_TITLE} (${VERSION_TEXT})" + fi + + cat > /tmp/pr_body.txt <&2 + exit 0 + } + + echo "[INFO] Pull request created successfully" + - name: Publish audit trail if: always() run: |