-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.41 KB
/
add_composer.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Add a composer
on:
workflow_dispatch:
inputs:
composer:
description: "The composer to add"
required: true
branch_suffix:
description: "The suffix of the branch to create"
required: true
jobs:
run_add_composers_and_create_pr:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x" # Adjust this to your required Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r data_collection/requirements.txt
- name: Run script.py
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python data_collection/add_composer.py --composer "${{ github.event.inputs.composer }}" --target=public/data
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: "main"
branch: add-composer-${{ github.event.inputs.branch_suffix }}
commit-message: Add composer ${{ github.event.inputs.composer }}
title: Add composer ${{ github.event.inputs.composer }}
body: "This PR was created automatically by GitHub Actions."
reviewers: "zulko"
delete-branch: true