Skip to content

API wheel source code update [apiwheel] #5

API wheel source code update [apiwheel]

API wheel source code update [apiwheel] #5

# see https://github.com/marketplace/actions/github-action-for-creating-pull-requests
name: Update Python API Wheel
on:
push:
branches:
- apiwheel-update-main
- apiwheel-update-2026
- apiwheel-update-2025
jobs:
UpdatePythonApiDoc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set target branch
id: target
run:
|
echo "Current branch: ${GITHUB_REF#refs/*/}"
if [[ ${GITHUB_REF#refs/*/} == "apiwheel-update-main" ]]; then
TARGET_BRANCH="main"
fi
if [[ ${GITHUB_REF#refs/*/} == "apiwheel-update-2026" ]]; then
TARGET_BRANCH="2026"
fi
if [[ ${GITHUB_REF#refs/*/} == "apiwheel-update-2025" ]]; then
TARGET_BRANCH="2025"
fi
echo "Target branch: ${TARGET_BRANCH}"
echo "target_branch=${TARGET_BRANCH}" >> $GITHUB_OUTPUT
- name: Set reviewers
id: reviewers
run:
|
ALL_REVIEWERS="fblankenburgzeiss,mprinkezs"
CURR_REVIEWERS=$(echo "$ALL_REVIEWERS" | sed "s/${{ github.actor }}//g")
echo "Reviewers: ${CURR_REVIEWERS}"
echo "curr_reviewers=${CURR_REVIEWERS}" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: devops-infra/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
#source_branch: apiwheel-update-main
target_branch: ${{ format('{0}', steps.target.outputs.target_branch) }}
title: ${{ format('Python API wheel update pull request ({0})', steps.target.outputs.target_branch) }}
#template: .github/PULL_REQUEST_TEMPLATE.md
body: "**Automated pull request**"
reviewer: ${{ format('{0}', steps.reviewers.outputs.curr_reviewers) }}
#assignee: octocat
#label: documentation
#milestone: My milestone
#draft: true
#old_string: "<!-- Add your description here -->"
#new_string: "** Automatic pull request**"
get_diff: true
ignore_users: "dependabot"
allow_no_diff: false
- name: Mark as successful
# "Create Pull Request" fails if the PR already exists
if: always()
run: echo "RESULT=success" >> $GITHUB_OUTPUT