Skip to content

Configuration#

actrun provides multiple sources for config values. These values can be accessed within the action graph, like secrets or file paths. The configuration priority is as follows:

graph TD
    Flags["Program Flags"]
    Env["Environment Vars via '.env'"]
    Envs["Environment Vars"]
    LocalActConfig["Local Config (.actconfig)"]
    GlobalActConfig["Global Config (~/.actconfig)"]
    Flags --> Env
    Env --> Envs
    Envs --> LocalActConfig
    LocalActConfig --> GlobalActConfig

Methods#

If a configuration value is set in multiple sources, the value from the source with the highest priority is used. If environment variables or secrets are split across multiple sources, they are combined.

Program Flags#

Flags provide the highest priority for configuration settings. Example:

./actrun --graph_file=my_graph.act

.env File#

Place a .env file in the same directory as actrun. Example content:

GRAPH_FILE=my_graph.act

Environment Variables#

Environment variables provide a way to set configuration values as well. Example:

export GRAPH_FILE=my_graph.act
./actrun

Local Configuration File#

Place a YAML file called .actconfig in the same directory as the graph to provide configurations like environment variables or secrets. Example content:

env:
  SOME_ENV_VAR: some_value
  SOME_OTHER_ENV_VAR: some_other_value
secrets:
  MY_SECRET1: abcdefgh

Global Configuration File#

Place a YAML file called .actconfig in the home folder to provide fallback configurations. Example content:

env:
  SOME_ENV_VAR: some_fallback_value
  SOME_OTHER_ENV_VAR: some_other_fallback_value
secrets:
  MY_SECRET2: 0123456789

Debug Output#

To enable debug output during startup to see where configurations are loaded from, set the ACTDEBUG environment variable to true. This will provide detailed information about the source of each configuration setting.

export ACTDEBUG=true
./actrun
env graph_file: my_graph.act

Secrets#

Secrets can only be set via .actconfig files using the secrets key. Example content:

secrets:
  MY_SECRET: My Secret Value
  MY_SECRET_2: Another Secret Value

Secrets can be accessed using the 🔑 Secret Node. Alternatively, you can access them directly in the inputs of Run Program, Run Script or Environment Vars by using the Expression Syntax.

GitHub Actions workflows#

The following statement is only valid for action graphs running in GitHub Actions workflows. To pass all repository or organization secrets to the actionforge/action input in your GitHub Actions workflows, check out the following example below:

.github/workflows/my-gh-workflow.yml
- name: Execute Action Graph
  uses: actionforge/action@1cb7c39...
  with:
      graph_file: my-workflow.yml
      secrets: ${{ toJson(secrets) }} # (1)
  1. ℹ Add this line to allow that your secrets can be accessed within the action graph.