---
title: "Inputs and outputs"
description: "Look up every input the Action accepts, every output it sets and what the job summary shows."
canonical_url: "https://diglot.sh/workflow/action/inputs-and-outputs"
---
# Inputs and outputs

> Look up every input the Action accepts, every output it sets and what the job summary shows.

This page is a reference for the options of `danielroe/diglot/packages/action`. Pass inputs with `with:` and the API key with `env:`.

## Inputs

<table>
<thead>
  <tr>
    <th>
      Input
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        working-directory
      </code>
    </td>
    
    <td>
      <code>
        .
      </code>
    </td>
    
    <td>
      Root of the translations repository, where <code>
        diglot.config.ts
      </code>
      
       lives
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        locales
      </code>
    </td>
    
    <td>
      every locale with machine translation enabled
    </td>
    
    <td>
      Only these locales, separated by commas or spaces
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sources
      </code>
    </td>
    
    <td>
      all sources
    </td>
    
    <td>
      Only these sources, separated by commas or spaces
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        model
      </code>
    </td>
    
    <td>
      <code>
        mt.model
      </code>
      
      , then <code>
        DIGLOT_MT_MODEL
      </code>
    </td>
    
    <td>
      Model id for the Vercel AI Gateway
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        ai-gateway-api-key
      </code>
    </td>
    
    <td>
      the <code>
        AI_GATEWAY_API_KEY
      </code>
      
       environment variable
    </td>
    
    <td>
      The gateway key
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      none
    </td>
    
    <td>
      The most segments per locale sent to the model in one run. The rest wait for the next run
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        retry-rejected
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Translate segments that QA rejected in earlier runs again
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        commit
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Commit the changes. With <code>
        false
      </code>
      
      , the files stay in the working tree
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        build-dist
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
    </td>
    
    <td>
      Build <code>
        dist/<locale>.json
      </code>
      
       and add it to the commit
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        git-user-name
      </code>
    </td>
    
    <td>
      <code>
        diglot[bot]
      </code>
    </td>
    
    <td>
      The commit author name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        git-user-email
      </code>
    </td>
    
    <td>
      <code>
        diglot[bot]@users.noreply.github.com
      </code>
    </td>
    
    <td>
      The commit author email
    </td>
  </tr>
</tbody>
</table>

A `sources` value that names an unknown source fails the run and lists the configured sources.

## Outputs

<table>
<thead>
  <tr>
    <th>
      Output
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        translated
      </code>
    </td>
    
    <td>
      Segments translated from scratch
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        updated
      </code>
    </td>
    
    <td>
      Translations updated from their predecessor
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        carried
      </code>
    </td>
    
    <td>
      Translations carried over from their predecessor
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        rejected
      </code>
    </td>
    
    <td>
      Segments rejected by QA
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        costUsd
      </code>
    </td>
    
    <td>
      The model cost in USD, when the provider reports it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        committed
      </code>
    </td>
    
    <td>
      <code>
        true
      </code>
      
       when a commit was made
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        sha
      </code>
    </td>
    
    <td>
      The new commit
    </td>
  </tr>
</tbody>
</table>

All values are strings, so compare with `== 'true'`. The usual use is the push step:

```yaml
- if: steps.diglot.outputs.committed == 'true'
  run: git pull --rebase origin ${{ github.ref_name }} && git push
```

## The job summary

Every run writes a summary to the job page. It has a table per locale with machine translation on or off, the counts of translated, updated, carried, rejected, skipped and deferred segments, the requests, the tokens in and out and the cost. A second table lists each source with its revision range and how many segments were added, removed and modified. Segments rejected by QA are listed below that with their issues, up to 100.

The `Skipped` column counts the live segments of a locale whose record a reviewer rejected. `Deferred` counts the segments that `limit` left for a later run.


## Sitemap

See the full [sitemap](https://diglot.sh/sitemap.md) for all pages.
