Replies: 4 comments
-
Hi @probablyup, thanks for the request! Currently, you can disable pull request creation by the Action and use a separate Action for this after making the necessary changes: name: Crowdin Action
on:
push:
branches: [ main ]
jobs:
synchronize-with-crowdin:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: crowdin action
uses: crowdin/github-action@v1
with:
upload_sources: true
upload_translations: true
download_translations: true
push_translations: false # Do not commit & push changes
create_pull_request: false # Do not create a PR
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Custom script
run: ./script.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: 'New Crowdin translations'
title: 'New Crowdin Translations'
body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
branch: 'feat/l10n-crowdin-translations' Visit the Create Pull Request GH Action page to see all the available options. P.S. I didn't test this example, but the workflow should look like the above. |
Beta Was this translation helpful? Give feedback.
-
We are looking for a similar option, but in our case to run linting & normalisation scripts before the commit. |
Beta Was this translation helpful? Give feedback.
-
Hi @renchap, I just saw your solution and it looks pretty good 🙂 |
Beta Was this translation helpful? Give feedback.
-
Yes, and I understand why it would be hard to do in the action, because your command will be ran from the container, where you most probably dont have the dependencies you need. Related to this, I was not expecting the files generated by the action to be owned by |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
I'm working on integrating CrowdIn with a project using "changesets". I'd like to run a script that adds a file to be committed alongside the translations.
Describe the solution you'd like
A
before_commit_script
option in the action for some arbitrary bash code to be run before files are committed to the localization branch.Describe alternatives you've considered
I have a different github workflow rigged up but it would be nice to not need an additional workflow.
Beta Was this translation helpful? Give feedback.
All reactions