Run gen script #119
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: Run gen script | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 1" # Every Monday at 00:00 UTC | |
jobs: | |
gen: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Install Dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Get dependencies | |
run: dart pub get | |
working-directory: gen | |
- name: Run gen/main.dart | |
run: dart run main.dart | |
working-directory: gen | |
- name: Generate commit message | |
id: commit-message | |
env: | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
MODEL: gpt-4o-mini | |
run: | | |
COMMIT_MSG=$(./scripts/commit-message.sh) | |
echo "COMMIT_MSG=$COMMIT_MSG" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
if: ${{ steps.commit-message.outputs.COMMIT_MSG != '' }} | |
with: | |
title: ${{ steps.commit-message.outputs.COMMIT_MSG }} | |
commit-message: ${{ steps.commit-message.outputs.COMMIT_MSG }} | |
branch: gen |