Variables
This document is the complete reference for AtomGit Action variables, including descriptions of four variable types: env, vars, secrets, and inputs, as well as a complete list of ATOMGIT_* system variables.
AtomGit Action supports multiple types of variables to pass configuration information and sensitive data within workflows.
4.1 Variable Types
env Variables (Custom Environment Variables)
Environment variables defined at the workflow, job, or step level using the env: keyword, which are directly injected into the Runner as system environment variables.
env:
GLOBAL_VAR: global_value # workflow level
jobs:
build:
name: Build
env:
JOB_VAR: job_value # job level
steps:
- name: Step
env:
STEP_VAR: step_value # step level
run: echo "$GLOBAL_VAR $JOB_VAR $STEP_VAR"
In the
run:script, they can be used directly as system environment variables ($VAR_NAME), and in expressions using${{ env.VAR_NAME }}.
vars Variables (Configuration Variables)
Non-sensitive configuration variables defined on the AtomGit platform settings page, managed at the organization/project level.
- Organization-level vars: Available to all projects under the organization
- Project-level vars: Available only to the current project
Access: ${{ vars.VAR_NAME }}
secrets Variables (Encrypted Keys)
Sensitive encrypted data defined on the AtomGit platform settings page, managed at the organization/project level.
- Organization-level secrets: Available to all projects under the organization
- Project-level secrets: Available only to the current project
- Environment-level secrets: Bound to specific deployment environments
Access: ${{ secrets.SECRET_NAME }}
Log Masking: All secret values are automatically replaced with
***in log outputs, preventing leakage through logs.
inputs Variables (Workflow Input Parameters)
Parameters defined in the inputs: of workflow_dispatch or workflow_call.
Access: ${{ inputs.INPUT_NAME }}
Inputs Property Fields:
| Field | Description | Example Value |
|---|---|---|
type | Type of inputs | string, boolean, choice, number |
required | Whether it is required | true, false |
description | Description | env_type, port_number |
default | Default value | true, false |
options | Single choice, applicable only for choice type | info, warning, error |
AtomGit Action supports the following inputs types: string, boolean, choice, and number.
| type | Description | Example Value |
|---|---|---|
string | String input | test, prod, dev |
boolean | Boolean input | true, false |
choice | Single-choice input, configured via the options field | info, warning, error |
number | Number input | 8080, 50 |
4.2 Variable Priority
When variables with the same name are defined at different levels, the priority from highest to lowest is:
step > job > workflow
That is: step-level env > job-level env > workflow-level env.
For vars and secrets, project-level > organization-level (project-level variables with the same name override organization-level ones).
4.3 Complete List of ATOMGIT_* System Variables
AtomGit Runner automatically injects the following system environment variables when each workflow runs:
| System Variable | Description | Example Value |
|---|---|---|
ATOMGIT_TOKEN | Workflow authentication token (auto-generated, used for API calls) | ghs_xxxxx |
ATOMGIT_SHA | SHA of the triggered commit | a1b2c3d4e5f6... |
ATOMGIT_REF | Full name of the triggered reference | refs/heads/main |
ATOMGIT_REF_NAME | Short name of the triggered reference | main |
ATOMGIT_REF_TYPE | Reference type | branch / tag |
ATOMGIT_EVENT_NAME | Name of the triggering event | push |
ATOMGIT_EVENT_PATH | Path to the event payload JSON file | /home/runner/_temp/_atomgit_workflow/event.json |
ATOMGIT_WORKSPACE | Runner workspace path | /home/runner/workspace/repo |
ATOMGIT_ACTION | Current Action name | my-action |
ATOMGIT_REPOSITORY | Repository full name | owner/repo |
ATOMGIT_RUN_ID | Workflow run ID | 12345 |
ATOMGIT_RUN_NUMBER | Workflow run number | 42 |
ATOMGIT_RUN_ATTEMPT | Retry count | 1 |
ATOMGIT_WORKFLOW | Workflow name | CI Pipeline |
ATOMGIT_HEAD_REF | PR source branch (only for PR events) | feature/new-api |
ATOMGIT_BASE_REF | PR target branch (only for PR events) | main |
ATOMGIT_SERVER_URL | AtomGit platform root URL | https://atomgit.com |
ATOMGIT_API_URL | AtomGit API base URL | https://api.atomgit.com |
ATOMGIT_GRAPHQL_URL | AtomGit GraphQL API URL | https://api.atomgit.com/graphql |
ATOMGIT_OUTPUT | Step output file path | See workflow command reference |
ATOMGIT_ENV | Step environment variable file path | See workflow command reference |
ATOMGIT_PATH | Step system PATH file path | See workflow command reference |
ATOMGIT_STEP_SUMMARY | Step summary file path | See workflow command reference |
ATOMGIT_ACTION_REPOSITORY | Action source repository | owner/action-repo |
ATOMGIT_ACTION_REF | Action source reference | v1 |
Note:
ATOMGIT_TOKENis valid only during the workflow run and becomes invalid after the run ends. Do not persist this token.