Skip to content

Add gifs

Add gifs #60

Workflow file for this run

name: Main Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
pull-requests: write
# Add other necessary permissions
jobs:
# Job to read content from a specified file
read_content:
name: Read Content
if: ${{ github.actor != 'github-actions[bot]' }}
uses: ./.github/workflows/read_content.yml
with:
# The input file path to read
input1: "Sources/Babel/Resources/en.lproj/Localizable.strings"
send_to_openai:
name: Send Data to OpenAI
needs: read_content
if: ${{ github.actor != 'github-actions[bot]' }}
uses: ./.github/workflows/send_openai.yml
with:
# Content obtained from the read_content job's output
content: "${{ needs.read_content.outputs.content }}"
# List of target languages for translation
languages: |
[
"es",
"fr",
"de"
]
# Specify the GPT model to use for translation
gpt_model: "gpt-4"
# Instruction for the translation model to ensure quality
general_instruction: "Please ensure the translations are accurate and contextually appropriate."
secrets: inherit
write_content:
name: Write Content
needs: send_to_openai
if: ${{ github.actor != 'github-actions[bot]' }}
uses: ./.github/workflows/write_content.yml
secrets: inherit
unit_test:
name: Run Unit Tests
needs: write_content
if: ${{ github.actor != 'github-actions[bot]' }}
uses: ./.github/workflows/unit_test.yml
secrets: inherit
notify_slack:
name: Notify Slack
needs:
- unit_test
- send_to_openai
if: ${{ github.actor != 'github-actions[bot]' }}
uses: ./.github/workflows/notify_slack.yml
with:
# Pass the number of languages translated
num_of_languages: "${{ needs.send_to_openai.outputs.num_of_languages }}"
# Pass the token count used in the translation
tokens_count_used: "${{ needs.send_to_openai.outputs.tokens_count_used }}"
# Pass the result of the unit tests
unit_test_success: "${{ needs.unit_test.outputs.test_success == 'true' }}"
secrets: inherit ## Important or else secret isnt found in sub workflow