ottobot-create #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Install uv | |
uses: astral-sh/setup-uv@v2 | |
- 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 | |
# Cache aider cache, input, and chat history files for this branch | |
# - name: Cache Aider cache, input, and chat history files | |
# uses: actions/cache@v4 | |
# with: | |
# path: .aider.tags.cache.v3 | |
# key: | |
- name: Run ottobot/create script | |
run: ./.github/ottobot/create | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
- name: Run compile-readmes script and commit changes | |
run: | | |
./scripts/compile-readmes | |
git add . | |
git diff --quiet && git commit -m "Compile updated READMEs" || echo "No changes to commit." | |
- 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 |