Crowdin Updates workflow (starship/starship)
The Crowdin Updates workflow from starship/starship, explained and optimized by Latchkey.
A
CI health: A - excellent
Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the Crowdin Updates workflow from the starship/starship repository, a real project running GitHub Actions. It is shown here with attribution under its ISC license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
workflow (.yml)
# Run pre-translate with translation memory, all files/langs, at midnight daily.
name: Crowdin Updates
on:
schedule:
- cron: '0 0 * * *'
jobs:
trigger_crowdin_tm:
name: Crowdin Translation Memory Trigger
runs-on: ubuntu-latest
# Prevent this workflow from running (and failing) on forks
if: github.repository == 'starship/starship'
steps:
- uses: starship/crowdin-pretranslate-action@05f21625b1486f1b77d53002fed82c4609247712 # v0.1.1
with:
project_id: 372655
api_key: ${{ secrets.CROWDIN_API_TOKEN }}
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
# Run pre-translate with translation memory, all files/langs, at midnight daily. name: Crowdin Updates on: schedule: - cron: '0 0 * * *' jobs: trigger_crowdin_tm: timeout-minutes: 30 name: Crowdin Translation Memory Trigger runs-on: latchkey-small # Prevent this workflow from running (and failing) on forks if: github.repository == 'starship/starship' steps: - uses: starship/crowdin-pretranslate-action@05f21625b1486f1b77d53002fed82c4609247712 # v0.1.1 with: project_id: 372655 api_key: ${{ secrets.CROWDIN_API_TOKEN }}
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Add a job timeout so a hung step cannot burn hours of runner time.
This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.