-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Crowdin CI v2 (crowdin/github-action@v1 attempt) #12936
Conversation
extract env vars to single-declaration; remove sleep and replace with awaitLatestBuild script; move timing to AM,
this is updated with each import cycle and committed; large number of build minutes and not required here
in lieu of incorporation into CI/CD workflow; keeps triggerBuild.ts script
Repeat calls could produce the same build ID. `import "dotenv/config"` not needed when called from an action
Requires getting process.env.BUILD_ID from previous script in workflow (triggerBuild.ts)
replaces build, await and download steps
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
env: | ||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved these up to avoid repeating them during each needed step
- name: Build Crowdin project | ||
uses: crowdin/github-actions@v1 | ||
with: | ||
download_translations: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to copilot, the crowdin/github-actions@v1
should download the lang folders to ./crowdin
, ie. ./crowdin/fa/**
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly after testing, this action does not do what we need it to do. It requires uploading files, and then will only download the translations for those files and place them in a single PR. Placing back in draft until reversion of crowdin/github-action@v1
usage.
|
||
# Prepare bucket ids | ||
- name: Get latest translation bucket directory ids | ||
run: npx ts-node -O '{"module":"commonjs"}' ./src/scripts/crowdin/translations/getBucketDirectoryIds.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run the script to get the up-to-date bucket directory id's
Marked as ready for review from a code side. Not sure the best way to test this though since it involved our GitHub repo and folder/file structure, Crowdin project, API keys and GH actions. We may need to just give this a shot in prod and see how it goes (doesn't touch any website code/content directly; would only be running background actions and posting PRs). |
Given limitations of crowdin action, closing in lieu of #12922 |
Description
crowdin-ci.ts
(previouslyget-translations.ts
) with new scriptscrowdin/github-actions@v1
to handle build/await/download stepsbuild-crowdin
workflow (triggerBuild.ts
) deprecated