-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.52 KB
/
update-pronunciations.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
48
49
50
51
52
53
54
55
56
name: Update Pronunciations
on:
issues:
types: [opened, edited]
workflow_dispatch:
inputs:
language:
description: "Target language (english/japanese/korean)"
required: true
default: "english"
source:
description: "Dictionary source"
required: true
default: "cambridge"
jobs:
process-missing-words:
runs-on: ubuntu-latest
if: contains(github.event.issue.labels.*.name, 'missing-pronunciation')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install aiohttp beautifulsoup4 tqdm
- name: Extract missing words
run: |
python scripts/gather/extract_words.py "${{ github.event.issue.body }}"
- name: Update pronunciations
run: |
python scripts/gather/update_pronunciations.py
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Update pronunciation data"
title: "Update pronunciation data from issue #${{ github.event.issue.number }}"
body: |
Updates pronunciation data based on issue #${{ github.event.issue.number }}
- Processed missing words
- Updated pronunciation database
branch: update-pronunciations
base: main