Skip to content

Commit

Permalink
Update Crowdin Actions workflow to inherit old OAuth settings (github…
Browse files Browse the repository at this point in the history
…#16096)

* update Actions workflow to use crowdin.yml for config

* no need for this comment; CODEOWNERS will now trigger a ping

* add a comment about why we need a custom PAT

* update Crowdin branch names

Co-authored-by: Chiedo John <[email protected]>
  • Loading branch information
zeke and chiedo authored Oct 16, 2020
1 parent 5f7243c commit e35c506
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 30 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Please ping @github/docs-localization in the PR whenever you update this file!

name: Crowdin Sync

on:
Expand All @@ -25,18 +23,20 @@ jobs:

# Using a custom config temporarily to avoid clobbering the existing crowdin.yml
# that is used by the github-help-docs OAuth integration.
config: 'crowdin-actions-config.yml'
config: 'crowdin.yml'

# This is the name of the git branch that Crowdin will create when opening a pull request.
# This branch does NOT need to be manually created. It will be created automatically by the action.
localization_branch_name: automated-crowdin-translations
localization_branch_name: translations

# This is the name of the top-level directory that Crowdin will use for files.
# Note that this is not a "branch" in the git sense, but more like a top-level directory in your Crowdin project.
# This branch does NOT need to be manually created. It will be created automatically by the action.
crowdin_branch_name: crowdin-main
crowdin_branch_name: main

env:
# Using an @octoglot token instead of the default Actions-provided GITHUB_TOKEN here
# so that subsequent workflows will be able to run on the pull request created by this workflow.
GITHUB_TOKEN: ${{ secrets.OCTOGLOT_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}

# This is a numeric id, not to be confused with Crowdin API v1 "project identifier" string
Expand Down
25 changes: 0 additions & 25 deletions crowdin-actions-config.yml

This file was deleted.

7 changes: 7 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,10 @@ files:
"data/graphql",
"data/products.yml"
]

# These end up as env vars used by the GitHub Actions workflow
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN

# https://support.crowdin.com/configuration-file-v3/#saving-directory-structure-on-server
preserve_hierarchy: true

0 comments on commit e35c506

Please sign in to comment.