Github Action - config not found

I am getting

❌ Configuration file doesn't exist. Run the 'crowdin init' to generate configuration skeleton

when trying to run the pre-translation command with the Github Action.

See below I have two actions, the upload_sources action works just fine, and it fails on the pre-translation one.

To Reproduce

      - name: Crowdin push source strings
        uses: crowdin/github-action@v2
        with:
          upload_sources: true
          upload_translations: false
          download_translations: false
          config: './crowdin.yml'
        env:
          CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
          CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}

      - name: Trigger Crowdin pre-translation
        uses: crowdin/github-action@v2
        with:
          command: 'pre-translate'
          command_args: '--method ai --ai-prompt 47703'
          config: './crowdin.yml'
        env:
          CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
          CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}

Hi @trevorweng

The pre-translation is definitely supported by the GitHub Actions

You’ve used this command, correct?

Can you provide me with a full system response? Also, what CLI client are you using?

When I run it directly via CLI it all works fine too. It is just failing when I am running it via the Github Action.

See my screenshots, one Github Action succeeds and the other one fails.


Hi!
Can you try set the config: ‘./crowdin.yml’ to config: ‘crowdin.yml’ and let us know about the result?

Yes I have tried that, it’s the same result, one works and the other doesn’t. I suspect there’s something wrong with executing commands via Github Action.

I found the issue: my crowdin.yml was actually located in a subfolder, so I was trying to pass website/crowdin.yml.

I’ve now moved crowdin.yml up one directory and am passing just crowdin.yml, which works. This feels like something that should be addressed; it would be ideal to support relative paths.

Hi @trevorweng ,

Thank you for letting us know, we are glad to hear that you managed to figure it out on your own