Skip to content

Upmerge docs to edge #17

Upmerge docs to edge

Upmerge docs to edge #17

Workflow file for this run

name: Upmerge samples to edge
on:
workflow_dispatch:
inputs:
version:
description: 'Branch name (e.g. v0.32)'
required: true
default: ''
type: string
jobs:
upmerge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_RAD_CI_BOT_PAT }}
ref: edge
- name: Configure git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Radius CI Bot"
- name: Create new branch
run: |
export DATE=$(date +%Y-%m-%d)
export RAND=$(openssl rand -hex 2)
git checkout -b upmerge/$DATE-$RAND
# - name: Upmerge docs
# run: |
# export SOURCE_BRANCH=$(basename ${{ github.ref }})
# echo "Upmerging samples from $SOURCE_BRANCH to edge"
# git fetch origin $SOURCE_BRANCH
# git merge --no-commit origin/$SOURCE_BRANCH
- name: Upmerge docs
run: |
export SOURCE_BRANCH=${{ inputs.version }}
echo "Upmerging samples from $SOURCE_BRANCH to edge"
git fetch origin $SOURCE_BRANCH
git merge --no-commit origin/$SOURCE_BRANCH
- name: Commit changes
run: |
git commit -m "Upmerge to edge"
git push --set-upstream origin upmerge/$DATE
- name: Create pull request
env:
GITHUB_TOKEN: ${{ secrets.GH_RAD_CI_BOT_PAT}}
run: gh pr create --title "Upmerge to edge" --body "Upmerge to edge" --base edge --head upmerge/$DATE