fix(tools): set crowdin cron job (#41361)
Co-authored-by: Mrugesh Mohapatra <me@raisedadead.com>pull/41362/head
parent
aff0ea700d
commit
fa6b11f359
|
@ -1,6 +1,9 @@
|
|||
name: Crowdin Curriculum Download
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# runs every day at 12:00 noon UTC
|
||||
- cron: "0 12 * * *"
|
||||
|
||||
jobs:
|
||||
i18n-download-curriculum-translations:
|
||||
|
@ -81,3 +84,37 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID_CURRICULUM }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_CAMPERBOT_SERVICE_TOKEN }}
|
||||
|
||||
# Generate PR - all languages should go ABOVE this. #
|
||||
- name: Create PR
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_ACTIONS_CAMPERBOT_PA_TOKEN }}
|
||||
script: |
|
||||
const PR = await github.pulls.create({
|
||||
owner: 'freeCodeCamp',
|
||||
repo: 'freeCodeCamp',
|
||||
head: 'i18n-sync-learn',
|
||||
base: 'main',
|
||||
title: 'Crowdin Sync Learn',
|
||||
body: 'This PR was opened auto-magically by Crowdin.'
|
||||
});
|
||||
const PRNumber = PR.data.number;
|
||||
await github.issues.addLabels({
|
||||
owner: 'freeCodeCamp',
|
||||
repo: 'freeCodeCamp',
|
||||
issue_number: PRNumber,
|
||||
labels: [
|
||||
"crowdin-sync",
|
||||
"scope: i18n",
|
||||
"scope: learn"
|
||||
]
|
||||
});
|
||||
await github.pulls.requestReviewers({
|
||||
owner: 'freeCodeCamp',
|
||||
repo: 'freeCodeCamp',
|
||||
pull_number: PRNumber,
|
||||
reviewers: [
|
||||
'nhcarrigan'
|
||||
]
|
||||
});
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
name: Crowdin Curriculum Upload
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# runs everyday at 11:00 AM UTC
|
||||
- cron: "0 11 * * *"
|
||||
|
||||
jobs:
|
||||
i18n-upload-curriculum-files:
|
||||
|
|
Loading…
Reference in New Issue