Skip to main content

Action settings

Codeflow action settings configure the workflow execution environment for a repository. In the Action settings tab of the target repository details page, you can check the repository token required to connect runners and manage self-hosted runners and repository variables used in workflows.

Action setting items

Action settings are repository-level settings for running workflows. Workflows themselves are defined as YAML files under .codeflow/workflows in the default branch. In action settings, you manage environment information required to run those workflows.

ItemDescription
Repository tokenMapping identifier used to connect a runner and repository
RunnerEnvironment that actually runs workflow jobs
Repository variableVariable used to reuse values repeatedly used in workflows

For how to write and run workflow files, see Manage workflows.

Repository token

A repository token is a mapping identifier used to connect a runner to a repository. It is issued automatically when a repository is created and is used when connecting runners. It is an indefinite token with no separate expiration period, and reissue and revocation are not provided. Any user with repository view permission can check it.

Guide

Actual security authentication is handled through IAM access keys. The repository token is a mapping identifier used to connect a runner and repository, and is not used for authentication or authorization.

Manage runners

A runner is the environment that actually runs workflow jobs. Currently, only self-hosted runners installed on servers configured by users are supported.

To run workflow jobs, connect a runner to the repository and run it. Depending on its execution status, the runner processes jobs or stays in standby.

Prepare runner execution environment

Prepare the server where the runner will run. Linux, macOS, and Windows environments are supported.

Guide

The runner must be able to access the repository.

Runner execution methods

Runners can be used in two ways depending on the execution method: executable file method and container method.

ItemExecutable file methodContainer method
Runner registrationManualAutomatic
Execution methodRun commandsRun container
Execution includedSeparate execution requiredPerformed automatically when run
Environment configurationConfigure directlyContainer-based

Executable file method

With the executable file method, download the runner client, then run separate commands to register and start the runner.

Guide

After downloading the runner client, you may need to allow downloaded applications to open depending on the OS. On Windows, antivirus programs such as Windows Defender may detect the file and prevent execution or delete it automatically. In that case, add the file to the antivirus whitelist.

  1. Download the client for your OS environment to run the runner.

    FileVersionDownload link
    Linux x86_64 64bit0.1.2Download
    Linux ARM64 64bit0.1.2Download
    macOS x86_64 64bit0.1.2Download
    macOS ARM64 64bit0.1.2Download
    Windows i386 32bit0.1.2Download
  2. Grant execute permission to the downloaded runner client.

    Grant execute permission on Linux/macOS
    cd ${DownloadPath}
    chmod +x codeflow_runner
    ParameterTypeRequiredDescription
    DownloadPath🖌StringRequiredDirectory path where the runner client is located
  3. Register the runner with the command.

    Register runner
    ./codeflow_runner register \
    --endpoint-url ${endpoint_url} \
    --token ${runner_token} \
    --no-interactive
    ParameterDescription
    endpoint_url🖌Codeflow endpoint URL
    - Example: https://codeflow-git.kr-central-2.kakaocloud.com
    - The kr-central-2 part changes depending on the region.
    runner_token🖌Repository token used for runner registration
  4. After registering the runner, run the runner with the following command. If execution succeeds, the runner becomes Idle.

    ./codeflow_runner daemon

Container method

With containers, you can run a runner without manual configuration. When the container runs, runner registration and execution are performed automatically.

  1. For the runner to operate normally, enter the following environment variables when running the container.

    Set environment variables
    export KC_CODEFLOW_ENDPOINT_URL='${KC_CODEFLOW_ENDPOINT_URL}'
    export KC_CODEFLOW_ACCESS_KEY_ID='${KC_CODEFLOW_ACCESS_KEY_ID}'
    export KC_CODEFLOW_SECRET_ACCESS_ID='${KC_CODEFLOW_SECRET_ACCESS_ID}'
    export KC_CODEFLOW_RUNNER_REGISTRATION_TOKEN='${KC_CODEFLOW_RUNNER_REGISTRATION_TOKEN}'
    export KC_CODEFLOW_RUNNER_NAME='${KC_CODEFLOW_RUNNER_NAME}'
    export KC_CODEFLOW_RUNNER_LABELS='${KC_CODEFLOW_RUNNER_LABELS}'
    export KC_CODEFLOW_RUNNER_EPHEMERAL='${KC_CODEFLOW_RUNNER_EPHEMERAL}'
    Environment variableDescription
    KC_CODEFLOW_ENDPOINT_URL🖌Codeflow endpoint URL
    - Example: https://codeflow-git.kr-central-2.kakaocloud.com
    - The kr-central-2 part changes depending on the region.
    KC_CODEFLOW_ACCESS_KEY_ID🖌IAM access key ID
    - For more information, see Create access key.
    KC_CODEFLOW_SECRET_ACCESS_ID🖌Secret access key
    KC_CODEFLOW_RUNNER_REGISTRATION_TOKEN🖌Repository token used for runner registration
    KC_CODEFLOW_RUNNER_NAME🖌Runner name
    - If left empty, it is set automatically.
    KC_CODEFLOW_RUNNER_LABELS🖌Runner tags
    - Optional.
    KC_CODEFLOW_RUNNER_EPHEMERAL🖌Whether to automatically delete the runner after running a single job
    - Input value: true or false
    How KC_CODEFLOW_RUNNER_EPHEMERAL works

    If KC_CODEFLOW_RUNNER_EPHEMERAL is set to true, the runner automatically exits and unregisters after processing one job. If set to false, the runner does not exit after completing a job and continues waiting for and processing the next job.

    • The default is false.
  2. Run the container by applying the configured environment variables.

    Run container (Docker example)
    docker run --rm \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -e KC_CODEFLOW_ENDPOINT_URL="${KC_CODEFLOW_ENDPOINT_URL}" \
    -e KC_CODEFLOW_ACCESS_KEY_ID="${KC_CODEFLOW_ACCESS_KEY_ID}" \
    -e KC_CODEFLOW_SECRET_ACCESS_ID="${KC_CODEFLOW_SECRET_ACCESS_ID}" \
    -e KC_CODEFLOW_RUNNER_REGISTRATION_TOKEN="${KC_CODEFLOW_RUNNER_REGISTRATION_TOKEN}" \
    -e KC_CODEFLOW_RUNNER_NAME="${KC_CODEFLOW_RUNNER_NAME}" \
    -e KC_CODEFLOW_RUNNER_LABELS="${KC_CODEFLOW_RUNNER_LABELS}" \
    -e KC_CODEFLOW_RUNNER_EPHEMERAL="${KC_CODEFLOW_RUNNER_EPHEMERAL}" \
    --name codeflow_runner \
    ${RUNNER_IMAGE_URL}
    ItemDescription
    RUNNER_IMAGE_URL🖌Runner image URL
    - Use the provided value. It may change depending on the environment.

View runner list

In the Action settings tab of the repository details page, you can view the list of runners connected to the repository.

ItemDescription
NameRunner name
StatusRunner execution status
- Idle: Waiting for workflow execution
- Active: Running a workflow job
- Offline: Runner is not running or the connection is lost
Number of tagsNumber of tags configured for the runner. Click to view the tag list.
Created atDate and time when the runner was first created
More buttonDelete runner

Manage variables

Repository variables are settings that let you predefine and reuse values repeatedly used in workflows.

In the Action settings tab of the repository details page, you can view the repository variable list and create, modify, or delete repository variables.

ItemDescription
KeyUnique name used to identify the repository variable
ValueRepository variable value used in workflows