# Travis CI

> Request Travis CI builds on any branch or commit with config overrides and see what Travis CI made of each request, list builds, and manage a repository's environment variables and cron jobs. Builds only run once a plan is selected in Travis CI.

App · 13 actions. Web page: https://docs.lodol.com/docs/integrations/travis-ci

## Actions

### Create cron job

Build a branch daily, weekly or monthly. A branch has at most one cron job, so this replaces any it already has.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Branch (`branch`, text, required): The branch to build. It must exist on the code host and have been built by Travis CI before.
- How often (`interval`, text, required): How often to build the branch. One of: `daily`, `weekly`, `monthly`.
- Skip if recently built (`dont_run_if_recent_build_exists`, true/false): Skip a run when the branch was built in the last 24 hours. Default: `false`.

**Outputs**

- `active` (true/false): Whether it is switched on
- `branch` (text): Branch it builds
- `created_at` (text): When it was set up (ISO 8601)
- `dont_run_if_recent_build_exists` (true/false): Whether it skips a run when the branch was built in the last 24 hours
- `id` (number): Cron job id
- `interval` (text): daily, weekly or monthly
- `last_run` (text): When it last ran (ISO 8601)
- `next_run` (text): When it runs next (ISO 8601)
- `repository_id` (number): Travis CI repository id
- `repository_slug` (text): Repository owner and name

**Example output**

```json
{
  "active": true,
  "branch": "main",
  "created_at": "2026-10-20T09:00:00Z",
  "dont_run_if_recent_build_exists": true,
  "id": 61942,
  "interval": "weekly",
  "last_run": null,
  "next_run": "2026-10-27T09:00:00Z",
  "repository_id": 25113940,
  "repository_slug": "acme/api"
}
```

### Create environment variable

Add an environment variable to a repository's builds, for every branch or one. A private variable's value is hidden in build logs and never shown again. A name already used on the same branch is refused: use Update environment variable.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Name (`name`, text, required): Letters, digits and underscores, such as DEPLOY_TOKEN.
- Value (`value`, text, required): The value, kept exactly as typed.
- Show value in build logs (`public`, true/false): Leave off for secrets: the value is then hidden in logs and Travis CI never returns it. Default: `false`.
- Branch (`branch`, text): Only builds of this branch get it. Leave empty for all.

**Outputs**

- `branch` (text): The only branch it applies to, or null for all
- `id` (text): Variable id, for Update and Delete environment variable
- `name` (text): Variable name
- `public` (true/false): Whether its value shows in build logs
- `value` (text): Its value, for a public variable only. Travis CI never returns a private one.

**Example output**

```json
{
  "branch": null,
  "id": "6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
  "name": "DEPLOY_REGION",
  "public": true,
  "value": "eu-west-1"
}
```

### Delete cron job

Delete a repository's cron job. It is checked to belong to the repository first, so a mistyped id can't remove another one.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Cron job (`cron_id`, text, required): The cron job. Pick one, or paste its id from List cron jobs.

**Outputs**

- `branch` (text): Branch it built
- `cron_id` (number): Id of the deleted cron job
- `deleted` (true/false): Always true: the cron job was deleted

**Example output**

```json
{
  "branch": "main",
  "cron_id": 61942,
  "deleted": true
}
```

### Delete environment variable

Delete an environment variable from a repository.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Environment variable (`env_var_id`, text, required): The variable. Pick one, or paste its id from List environment variables.

**Outputs**

- `deleted` (true/false): Always true: the variable was deleted
- `env_var_id` (text): Id of the deleted variable

**Example output**

```json
{
  "deleted": true,
  "env_var_id": "6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f"
}
```

### Get repository

Get one repository: its Travis CI id, default branch, whether Travis CI builds it, and its most recently started build.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.

**Outputs**

- `active` (true/false): Whether Travis CI builds it
- `default_branch` (text): Default branch
- `description` (text): Description from the code host
- `id` (number): Travis CI repository id, which every repository field accepts
- `language` (text): Main language, as the code host reports it
- `last_started_build` (object): The most recently started build, or null if it has none
- `name` (text): Repository name
- `owner_name` (text): Owner's login
- `private` (true/false): Whether it is private
- `slug` (text): Owner and name, such as acme/api
- `starred` (true/false): Whether you starred it in Travis CI
- `vcs_id` (text): The code host's id for the repository
- `vcs_type` (text): Code host type, such as GithubRepository
- `web_url` (text): The repository's page in Travis CI

**Example output**

```json
{
  "active": true,
  "default_branch": "main",
  "description": "Acme's public API",
  "id": 25113940,
  "language": "Python",
  "last_started_build": {
    "duration": 94,
    "event_type": "push",
    "finished_at": "2026-10-20T09:15:36Z",
    "id": 276451235,
    "number": "57",
    "previous_state": "failed",
    "pull_request_number": null,
    "pull_request_title": null,
    "started_at": "2026-10-20T09:14:02Z",
    "state": "passed"
  },
  "name": "api",
  "owner_name": "acme",
  "private": false,
  "slug": "acme/api",
  "starred": false,
  "vcs_id": "512345678",
  "vcs_type": "GithubRepository",
  "web_url": "https://app.travis-ci.com/github/acme/api"
}
```

### Get request

Get a build request, such as one from Trigger build: whether Travis CI approved or rejected it, its message (for a rejection, the reason, such as no plan selected), what it noticed in the config, and any builds made from it.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Request ID (`request_id`, text, required): The request id Trigger build returned.

**Outputs**

- `branch` (text): Branch requested
- `build_count` (number): How many builds were made from it
- `builds` (list): Builds made from the request; empty until there is one
- `commit_message` (text): Commit message
- `commit_sha` (text): Commit requested
- `created_at` (text): When it was made (ISO 8601)
- `event_type` (text): push, pull_request, api or cron
- `id` (number): Request id
- `message` (text): Travis CI's message about the request; for a rejected one, the reason, such as no plan selected or an unconfirmed email address
- `messages` (list): What Travis CI noticed in the build config
- `repository_id` (number): Travis CI repository id
- `repository_slug` (text): Repository owner and name
- `result` (text): approved or rejected, once processed
- `state` (text): How far Travis CI has got with it, such as pending, configured or finished

**Example output**

```json
{
  "branch": "main",
  "build_count": 1,
  "builds": [
    {
      "duration": 94,
      "event_type": "api",
      "finished_at": "2026-10-20T09:15:36Z",
      "id": 276451235,
      "number": "57",
      "previous_state": "failed",
      "pull_request_number": null,
      "pull_request_title": null,
      "started_at": "2026-10-20T09:14:02Z",
      "state": "passed"
    }
  ],
  "commit_message": "Bump dependencies",
  "commit_sha": "4f2a9c1e7b3d5a6f8e0c2b4d6a8f0e1c3b5d7a9f",
  "created_at": "2026-10-20T09:13:40Z",
  "event_type": "api",
  "id": 991204517,
  "message": "Nightly deploy check",
  "messages": [
    {
      "args": {
        "default": "ruby",
        "key": "language"
      },
      "code": "default",
      "key": "language",
      "level": "info",
      "line": null,
      "src": "api"
    }
  ],
  "repository_id": 25113940,
  "repository_slug": "acme/api",
  "result": "approved",
  "state": "finished"
}
```

### List branches

List the branches Travis CI knows for a repository, each with its latest build, or check one branch's status by its name.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Branch name (`name`, text): Only the branch with this name, such as main.
- Only existing branches (`existing_only`, true/false): Leave out branches deleted from the code host. Default: `true`.
- Sort by (`sort_by`, text): How to order the branches. One of: `default_branch,exists_on_github,last_build:desc` (Default branch first, then most recently built), `last_build:desc` (Most recently built first), `name` (Name, A to Z). Default: `default_branch,exists_on_github,last_build:desc`.
- Page size (`limit`, number): How many to return on this page. Travis CI's default is 25. From 1 to 100.
- Offset (`offset`, number): Where the page starts: the next_offset of the page before. Leave empty for the first page. At least 0.

**Outputs**

- `branches` (list): Branches
- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `next_offset` (number): Offset to ask for to get the next page, or null on the last page
- `offset` (number): Where this page starts
- `total` (number): How many there are in all

**Example output**

```json
{
  "branches": [
    {
      "default_branch": true,
      "exists_on_github": true,
      "last_build": {
        "duration": 94,
        "event_type": "push",
        "finished_at": "2026-10-20T09:15:36Z",
        "id": 276451235,
        "number": "57",
        "previous_state": "failed",
        "pull_request_number": null,
        "pull_request_title": null,
        "started_at": "2026-10-20T09:14:02Z",
        "state": "passed"
      },
      "name": "main",
      "repository_id": 25113940,
      "repository_slug": "acme/api"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_offset": null,
  "offset": 0,
  "total": 1
}
```

### List builds

List a repository's builds, newest first, optionally only on one branch, in some states or started by some events.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Branch (`branch`, text): Only builds of this branch. Leave empty for all.
- States (`state`, list): Only builds in these states. One or more of: `created`, `received`, `started`, `passed`, `failed`, `errored`, `canceled`.
- Started by (`event_type`, list): Only builds started by these events. One or more of: `push`, `pull_request` (Pull request), `api` (API request), `cron` (Cron job).
- Sort by (`sort_by`, text): How to order the builds. One of: `number:desc,id:desc` (Newest first), `id` (Oldest first). Default: `number:desc,id:desc`.
- Page size (`limit`, number): How many to return on this page. Travis CI's default is 25. From 1 to 100.
- Offset (`offset`, number): Where the page starts: the next_offset of the page before. Leave empty for the first page. At least 0.

**Outputs**

- `builds` (list): Builds
- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `next_offset` (number): Offset to ask for to get the next page, or null on the last page
- `offset` (number): Where this page starts
- `total` (number): How many there are in all

**Example output**

```json
{
  "builds": [
    {
      "branch": "main",
      "commit_message": "Bump dependencies",
      "commit_ref": "refs/heads/main",
      "commit_sha": "4f2a9c1e7b3d5a6f8e0c2b4d6a8f0e1c3b5d7a9f",
      "committed_at": "2026-10-20T09:13:40Z",
      "compare_url": "https://github.com/acme/api/compare/1a2b3c4d5e6f...4f2a9c1e7b3d",
      "created_by_login": "ada",
      "duration": 94,
      "event_type": "push",
      "finished_at": "2026-10-20T09:15:36Z",
      "id": 276451235,
      "is_finished": true,
      "job_ids": [
        627905412
      ],
      "number": "57",
      "previous_state": "failed",
      "priority": false,
      "private": false,
      "pull_request_number": null,
      "pull_request_title": null,
      "repository_id": 25113940,
      "repository_slug": "acme/api",
      "stages": [],
      "started_at": "2026-10-20T09:14:02Z",
      "state": "passed",
      "tag": null,
      "updated_at": "2026-10-20T09:15:36.512Z"
    }
  ],
  "count": 1,
  "has_more": true,
  "next_offset": 25,
  "offset": 0,
  "total": 57
}
```

### List cron jobs

List a repository's cron jobs: the branch each one builds, how often, and when it runs next.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.

**Outputs**

- `count` (number): How many there are
- `crons` (list): Cron jobs

**Example output**

```json
{
  "count": 1,
  "crons": [
    {
      "active": true,
      "branch": "main",
      "created_at": "2026-10-20T09:00:00Z",
      "dont_run_if_recent_build_exists": true,
      "id": 61942,
      "interval": "weekly",
      "last_run": null,
      "next_run": "2026-10-27T09:00:00Z",
      "repository_id": 25113940,
      "repository_slug": "acme/api"
    }
  ]
}
```

### List environment variables

List a repository's environment variables: name, id, branch, and the value of each public one. Travis CI never returns a private variable's value.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.

**Outputs**

- `count` (number): How many there are
- `env_vars` (list): Environment variables

**Example output**

```json
{
  "count": 2,
  "env_vars": [
    {
      "branch": null,
      "id": "6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
      "name": "DEPLOY_REGION",
      "public": true,
      "value": "eu-west-1"
    },
    {
      "branch": "main",
      "id": "0a9b8c7d-6e5f-4a3b-9c1d-2e3f4a5b6c7d",
      "name": "DEPLOY_TOKEN",
      "public": false,
      "value": null
    }
  ]
}
```

### List repositories

List the repositories you can see in Travis CI, active ones by default, with each one's id, slug, default branch and whether Travis CI builds it.

**Inputs**

- Status (`status`, text): Which repositories to list. One of: `active` (Active on Travis CI), `inactive` (Not active), `all`. Default: `active`.
- Visibility (`visibility`, text): Public repositories, private ones, or both. One of: `all` (Public and private), `public` (Public only), `private` (Private only). Default: `all`.
- Only starred (`starred`, true/false): Only repositories you starred in Travis CI. Default: `false`.
- Sort by (`sort_by`, text): How to order the repositories. One of: `name` (Name, A to Z), `name:desc` (Name, Z to A), `owner_name,name` (Owner, then name), `id:desc` (Most recently added first). Default: `name`.
- Page size (`limit`, number): How many to return on this page. Travis CI's default is 25. From 1 to 100.
- Offset (`offset`, number): Where the page starts: the next_offset of the page before. Leave empty for the first page. At least 0.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): Whether there is another page
- `next_offset` (number): Offset to ask for to get the next page, or null on the last page
- `offset` (number): Where this page starts
- `repositories` (list): Repositories
- `total` (number): How many there are in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "next_offset": null,
  "offset": 0,
  "repositories": [
    {
      "active": true,
      "default_branch": "main",
      "description": "Acme's public API",
      "id": 25113940,
      "language": "Python",
      "name": "api",
      "owner_name": "acme",
      "private": false,
      "slug": "acme/api",
      "starred": false,
      "vcs_id": "512345678",
      "vcs_type": "GithubRepository",
      "web_url": "https://app.travis-ci.com/github/acme/api"
    }
  ],
  "total": 1
}
```

### Trigger build

Ask Travis CI to build a branch, optionally a given commit, with a message and config overrides. Travis CI decides on the request moments later: Get request, with the request id this returns, shows the build or the reason there is none. Builds only run once a plan is selected in Travis CI. It accepts 10 such requests per repository an hour.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Branch (`branch`, text): The branch to build. Leave empty for the default branch.
- Commit (`sha`, text): The commit to build. Leave empty for the branch's latest.
- Message (`message`, text): Shown as the build's message in Travis CI.
- Config overrides (`config`, object): Settings to use for this build, one .travis.yml key per row, such as script with echo hello. A value written as JSON, such as a list, is sent as that JSON.
- Combine with .travis.yml (`merge_mode`, text): How the config overrides combine with the repository's .travis.yml. Used only with config overrides. One of: `deep_merge_append` (Merge into .travis.yml, adding to its lists), `deep_merge_prepend` (Merge into .travis.yml, putting lists first), `merge` (Replace whole sections of .travis.yml), `replace` (Ignore .travis.yml and use only this config). Default: `deep_merge_append`.

**Outputs**

- `branch` (text): Branch requested; empty means the default branch
- `merge_mode` (text): How the config was combined with .travis.yml
- `message` (text): Message sent with the request
- `remaining_requests` (number): Builds this repository can still be sent through the API this hour
- `repository_id` (number): Travis CI repository id
- `repository_slug` (text): Repository owner and name
- `request_id` (number): Request id, for Get request
- `sha` (text): Commit requested

**Example output**

```json
{
  "branch": "main",
  "merge_mode": null,
  "message": "Nightly deploy check",
  "remaining_requests": 9,
  "repository_id": 25113940,
  "repository_slug": "acme/api",
  "request_id": 991204517,
  "sha": null
}
```

### Update environment variable

Change an environment variable's value, name, branch or whether its value shows in build logs. Only what you fill in changes.

**Inputs**

- Repository (`repository`, text, required): The repository. Pick one, or type its owner/repo slug or Travis CI id, or paste its Travis CI URL.
- Environment variable (`env_var_id`, text, required): The variable. Pick one, or paste its id from List environment variables.
- New name (`name`, text): Letters, digits and underscores. Leave empty to keep it.
- New value (`value`, text): Kept exactly as typed. Leave empty to keep it.
- Show value in build logs (`public`, text): Whether the value shows in build logs. One of: `unchanged` (Leave as it is), `public` (Show the value in build logs), `private` (Hide the value). Default: `unchanged`.
- Branch (`branch`, text): Move it to apply only to this branch. Leave empty to keep it.

**Outputs**

- `branch` (text): The only branch it applies to, or null for all
- `id` (text): Variable id, for Update and Delete environment variable
- `name` (text): Variable name
- `public` (true/false): Whether its value shows in build logs
- `value` (text): Its value, for a public variable only. Travis CI never returns a private one.

**Example output**

```json
{
  "branch": null,
  "id": "6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
  "name": "DEPLOY_REGION",
  "public": true,
  "value": "eu-central-1"
}
```
