Skip to content

Merge pull request #111 from milaboratory/merge-2025-09-26 #18

Merge pull request #111 from milaboratory/merge-2025-09-26

Merge pull request #111 from milaboratory/merge-2025-09-26 #18

Workflow file for this run

name: "Create PR for beta branch (v4-beta -> v4)"
on:
push:
paths:
- '.github/workflows/0-merge-beta.yaml'
branches:
- 'v4-beta'
- 'v4'
workflow_dispatch:
inputs:
target_branch:
description: "Target branch to merge into"
required: true
type: choice
options:
- v4
default: "v4"
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Generate Zen Artisan Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_ZEN_APP_ID }}
private-key: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.target_branch || 'v4' }}
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 1000
- name: Get GitHub App User ID
id: get-user-id
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
echo \
"user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" \
>> "$GITHUB_OUTPUT"
- name: Merge ${{ github.event.inputs.target_branch || 'v4' }}-beta
shell: bash
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
USER_ID: ${{ steps.get-user-id.outputs.user-id }}
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
TARGET_BRANCH: ${{ github.event.inputs.target_branch || 'v4' }}
run: |
git config --global user.name "${APP_SLUG}[bot]"
git config --global user.email "${USER_ID}+${APP_SLUG}[bot]@users.noreply.github.com>"
#git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
./merge-beta.sh # script in repository root