Action Crowdin Contributors Free
ByAndrii BodnarVerified Author

A GitHub action to automate acknowledging translators and proofreaders to your projects ✨

Try Crowdin

Action Crowdin Contributors: Automate translator and reviewer crediting

Copy link

What does this action do?

Copy link

This action downloads the Top Members report and generates or updates a contributors' table in your project based on this report and the action configuration.

Usage

Copy link

Set up a workflow in .github/workflows/crowdin-contributors.yml (or add a job to your existing workflows).

Read the Configuring a workflow article for more details on how to create and set up custom workflows.

name: Crowdin Contributors Action

on:
  # When you push to the `main` branch
  push:
    branches: [ main ]
  # And optionally, once every 12 hours
  schedule:
    - cron: '0 */12 * * *' # https://crontab.guru/#0_*/12_*_*_*
  # To manually run this workflow
  workflow_dispatch:

jobs:
  crowdin-contributors:

    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: Generate Crowdin Contributors table
      uses: andrii-bodnar/action-crowdin-contributors@v1
      with:
        contributors_per_line: 8
        max_contributors: 32
        image_size: 64
        min_words_contributed: 256
      env:
        CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
        CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
        CROWDIN_ORGANIZATION: ${{ secrets.CROWDIN_ORGANIZATION }}

Creating a PR

Copy link

To create a PR with the updated table, we recommend usage of the Create Pull Request Action:

name: Crowdin Contributors Action

on:
  # When you push to the `main` branch
  push:
    branches: [ main ]
  # And optionally, once every 12 hours
  schedule:
    - cron: '0 */12 * * *' # https://crontab.guru/#0_*/12_*_*_*
  # To manually run this workflow
  workflow_dispatch:

jobs:
  crowdin-contributors:

    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v3

    - name: Generate Crowdin Contributors table
      uses: andrii-bodnar/action-crowdin-contributors@v1
      with:
        contributors_per_line: 8
        max_contributors: 32
        image_size: 64
        min_words_contributed: 256
      env:
        CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
        CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
        CROWDIN_ORGANIZATION: ${{ secrets.CROWDIN_ORGANIZATION }} # Optional. Only for Crowdin Enterprise

    - name: Create Pull Request
      uses: peter-evans/create-pull-request@v4
      with:
        title: Update Crowdin Contributors table
        body: By [action-crowdin-contributors](https://github.com/andrii-bodnar/action-crowdin-contributors) GitHub action
        commit-message: Update Crowdin Contributors table
        committer: Crowdin Bot <support+bot@crowdin.com>
        branch: crowdin-contributors/patch

Options

Copy link

For more options see the Marketplace Page.

Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.

Learn More
Categories
Development
Works with
  • Crowdin Enterprise
  • crowdin.com
Details

Released on Nov 15, 2022

Updated on Jul 30, 2024

Published by Andrii Bodnar

Identifier:action-crowdin-contributors