Skip to main content

Overview

Gitea Actions provides a powerful CI/CD system integrated directly into your repositories. The Actions API allows you to programmatically manage workflows, runs, jobs, runners, secrets, variables, and artifacts.

Workflows

List Repository Workflows

Get all workflows defined in a repository.
string
required
Owner of the repository
string
required
Name of the repository
array
List of workflow definitions
string
Workflow identifier (filename)
string
Display name of the workflow
string
Path to workflow file in repository
string
Workflow state (active, disabled)

Get Workflow

Retrieve details about a specific workflow.
string
required
Workflow identifier (filename or ID)

Enable/Disable Workflow

Enable or disable a workflow from running.

Dispatch Workflow

Manually trigger a workflow run with custom inputs.
string
required
Git reference (branch, tag, or commit SHA) to run workflow on
object
Input parameters defined in workflow dispatch configuration
boolean
Return workflow run ID and URLs in response

Workflow Runs

List Workflow Runs

List all workflow runs for a repository with optional filters.
string
Filter by workflow event (push, pull_request, schedule, workflow_dispatch)
string
Filter by branch name
string
Filter by status: pending, queued, in_progress, failure, success, skipped
string
Filter by username who triggered the run
string
Filter by commit SHA that triggered the run
array
integer
Unique run ID
string
Associated workflow filename
string
Current status of the run
string
Event that triggered the run
string
Git commit SHA for this run
string
ISO 8601 timestamp when run started
string
ISO 8601 timestamp when run completed

Get Workflow Run

Get details about a specific workflow run.
integer
required
Workflow run ID

Rerun Workflow

Rerun an entire workflow run or a specific job.

Delete Workflow Run

Delete a completed workflow run and its associated data.

Jobs

List Workflow Jobs

List all jobs in a workflow run.
array
integer
Job ID
string
Job name from workflow definition
string
Job status
string
When job started executing
string
When job finished
array
Individual steps within the job

Get Job

Get details about a specific job.

Download Job Logs

Download the log output from a job.

Runners

List Runners

List all runners available to a repository.
array
integer
Runner ID
string
Runner name
string
Runner status (online, offline)
array
Runner labels for job matching
string
Last time runner was active

Get Runner

Get details about a specific runner.

Delete Runner

Remove a runner from the repository.

Create Registration Token

Generate a token to register a new runner.
string
Registration token for runner setup
string
Token expiration time

Secrets

List Secrets

List all action secrets (without exposing values).
array
string
Secret name
string
Secret description
string
Creation timestamp

Create or Update Secret

Create a new secret or update an existing one.
string
required
Name of the secret (uppercase with underscores recommended)
string
required
Base64-encoded secret value
string
Description of what the secret is used for

Delete Secret

Delete a secret from the repository.

Variables

List Variables

List all action variables.
array
string
Variable name
string
Variable value (plaintext)
string
Variable description

Get Variable

Get a specific variable by name.

Create Variable

Create a new variable.
string
required
Variable value
string
Description of the variable

Update Variable

Update an existing variable.

Delete Variable

Delete a variable.

Artifacts

List Artifacts

List all artifacts for a repository or specific run.
string
Filter artifacts by name
array
integer
Artifact ID
string
Artifact name
integer
Size in bytes
string
Creation timestamp
boolean
Whether artifact has expired

Get Artifact

Get details about a specific artifact.

Download Artifact

Download an artifact as a zip file.
The download endpoint returns a redirect (302) to the actual artifact storage location.

Delete Artifact

Delete an artifact.

Admin Endpoints

Administrators can access system-wide actions data.

List All Jobs

List All Runs

Status Values

Workflow runs and jobs can have the following status values:
  • pending: Waiting to be queued
  • queued: Queued for execution
  • in_progress: Currently running
  • success: Completed successfully
  • failure: Failed with errors
  • skipped: Skipped due to conditions
  • cancelled: Manually cancelled

Best Practices

  • Use secrets for sensitive data like passwords and API keys
  • Use variables for non-sensitive configuration values
  • Set appropriate artifact retention periods to manage storage
  • Use workflow dispatch for manual deployments with controlled inputs
  • Monitor runner status to ensure adequate capacity
Secrets are encrypted at rest but should never be logged or exposed in workflow output.