mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
ci: add daily oss-agent-shin branch creation workflow (#28829)
Creates litellm_oss_agent_shin_MM_DD_YYYY from main every day at 00:00 UTC. Lets us retarget oss-agent-shin fork PRs onto a canonical branch so CircleCI runs with secrets, without granting the agent write access. Co-authored-by: shin-berri <shin-laptop@berri.ai> Co-authored-by: yuneng-jiang <yuneng@berri.ai> Co-authored-by: Ishaan Jaffer <ishaanjaffer0324@gmail.com>
This commit is contained in:
parent
1b6788e0c4
commit
48dd71b818
1 changed files with 47 additions and 0 deletions
47
.github/workflows/create_daily_oss_agent_shin_branch.yml
vendored
Normal file
47
.github/workflows/create_daily_oss_agent_shin_branch.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
name: Create Daily oss-agent-shin Branch
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # Runs every day at midnight UTC
|
||||||
|
workflow_dispatch: # Allow manual trigger
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-oss-agent-shin-branch:
|
||||||
|
if: github.repository == 'BerriAI/litellm'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
|
- name: Create daily oss-agent-shin branch
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
# Configure Git user
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
# Generate branch name with MM_DD_YYYY format
|
||||||
|
BRANCH_NAME="litellm_oss_agent_shin_$(date +'%m_%d_%Y')"
|
||||||
|
echo "Creating branch: $BRANCH_NAME"
|
||||||
|
|
||||||
|
# Fetch all branches
|
||||||
|
git fetch --all
|
||||||
|
|
||||||
|
# Check if the branch already exists
|
||||||
|
if git show-ref --verify --quiet refs/remotes/origin/$BRANCH_NAME; then
|
||||||
|
echo "Branch $BRANCH_NAME already exists. Skipping creation."
|
||||||
|
else
|
||||||
|
echo "Creating new branch: $BRANCH_NAME"
|
||||||
|
# Create the new branch from main
|
||||||
|
git checkout -b $BRANCH_NAME origin/main
|
||||||
|
# Push the new branch
|
||||||
|
git push origin $BRANCH_NAME
|
||||||
|
echo "Successfully created and pushed branch: $BRANCH_NAME"
|
||||||
|
fi
|
||||||
Loading…
Add table
Reference in a new issue