Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push translated README to PR branch instead of main #13

Open
glenn-jocher opened this issue Dec 9, 2022 · 1 comment
Open

Push translated README to PR branch instead of main #13

glenn-jocher opened this issue Dec 9, 2022 · 1 comment

Comments

@glenn-jocher
Copy link

glenn-jocher commented Dec 9, 2022

@dephraiim thanks for this action, it works really well! I'm trying to use it in https://github.com/ultralytics/yolov5.

I tried to update my yaml to create translations directly in Pull Requests in ultralytics/yolov5#10445, but was unable to do so. Do you know if it's possible to do this? Use case would be for translated READMEs to form part of a larger PR, which is a little cleaner than being recorded as a separate commit to master.

The yaml I tried for this is here:

name: Translate README

on:
  pull_request:
    branches:
      - main
      - master
    paths:
      - README.md
    
jobs:
  Translate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 16
      # ISO Langusge Codes: https://cloud.google.com/translate/docs/languages  
      - name: Adding README - Chinese Simplified
        uses: dephraiim/translate-readme@main
        with:
          LANG: zh-CN

And this is the error I get is

(node:1711) UnhandledPromiseRejectionWarning: Error: Error: fatal: You are not currently on a branch.

Screenshot 2022-12-08 at 16 41 17

@AyushExel

@glenn-jocher
Copy link
Author

Merging with YOLOv5 in ultralytics/yolov5#10445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant