Skip to content

ottobot-create

ottobot-create #15

name: ottobot-create
on:
schedule:
- cron: "0 20 * * *" # 2pm Central (20:00 UTC)
workflow_dispatch: {}
jobs:
create-pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Git user
run: |
git config user.name "GitHub Action"
git config user.email "[email protected]"
- name: Create unique branch
id: create_branch
run: |
BRANCH="ottobot-$GITHUB_RUN_NUMBER"
git checkout -b "$BRANCH"
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Cache aider files
uses: actions/cache@v4
with:
path: |
.github/ottobot/cache
.aider.tags.cache.v3
key: ${{ runner.os }}-ottobot-${{ steps.create_branch.outputs.branch }}
- name: Run ottobot/create script
run: ./.github/ottobot/create.sh
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Push branch
run: |
git push origin ${{ steps.create_branch.outputs.branch }}
- name: Create Pull Request
run: |
gh auth login --with-token < <(echo "${{ secrets.GITHUB_TOKEN }}")
gh pr create --fill-first --base main --head ${{ steps.create_branch.outputs.branch }} --label ottobot --reviewer davegaeddert