Skip to content

Convert all subtitle to transcript #23

Convert all subtitle to transcript

Convert all subtitle to transcript #23

name: Convert all subtitle to transcript
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
target-language:
description: The language to be converted
required: true
default: en
type: choice
options:
- en
- zh_tw
- ja
forced-regeneration:
required: true
default: false
type: boolean
# Allow pull request
permissions:
pull-requests: write
repository-projects: write
contents: write
jobs:
conversion:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/[email protected]
- name: Checkout
uses: actions/checkout@v3
# Converts specified subtitle to transcript
- name: Convert subtitle to transcript
run: python ./tools/subtitle_to_transcript_all.py ${{ github.event.inputs.target-language }} ${{ github.event.inputs.forced-regeneration }}
- name: Add all transcripts to be tracked
run: |
git add -A
- name: Create Pull Request
if: ${{ success() }}
uses: peter-evans/create-pull-request@v4
with:
commit-message: "Generated transcript for ${{ github.event.inputs.target-language }}"
title: "Generated transcript for ${{ github.event.inputs.target-language }}"
body: "Generated transcript for ${{ github.event.inputs.target-language }}"
base: main
labels: automated-pr
branch: all-transcript-generation-${{ github.event.inputs.target-language }}
delete-branch: true