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.
| Item | Description |
|---|---|
| Repository token | Mapping identifier used to connect a runner and repository |
| Runner | Environment that actually runs workflow jobs |
| Repository variable | Variable 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.
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.
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.
| Item | Executable file method | Container method |
|---|---|---|
| Runner registration | Manual | Automatic |
| Execution method | Run commands | Run container |
| Execution included | Separate execution required | Performed automatically when run |
| Environment configuration | Configure directly | Container-based |
Executable file method
With the executable file method, download the runner client, then run separate commands to register and start the runner.
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.
-
Download the client for your OS environment to run the runner.
File Version Download link Linux x86_64 64bit 0.1.2 Download Linux ARM64 64bit 0.1.2 Download macOS x86_64 64bit 0.1.2 Download macOS ARM64 64bit 0.1.2 Download Windows i386 32bit 0.1.2 Download -
Grant execute permission to the downloaded runner client.
Grant execute permission on Linux/macOScd ${DownloadPath}
chmod +x codeflow_runnerParameter Type Required Description DownloadPath🖌︎ String Required Directory path where the runner client is located -
Register the runner with the command.
Register runner./codeflow_runner register \
--endpoint-url ${endpoint_url} \
--token ${runner_token} \
--no-interactiveParameter Description endpoint_url🖌︎ Codeflow endpoint URL
- Example:https://codeflow-git.kr-central-2.kakaocloud.com
- Thekr-central-2part changes depending on the region.runner_token🖌︎ Repository token used for runner registration -
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.
-
For the runner to operate normally, enter the following environment variables when running the container.
Set environment variablesexport 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 variable Description KC_CODEFLOW_ENDPOINT_URL🖌︎ Codeflow endpoint URL
- Example:https://codeflow-git.kr-central-2.kakaocloud.com
- Thekr-central-2part 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 falseHow KC_CODEFLOW_RUNNER_EPHEMERAL worksIf
KC_CODEFLOW_RUNNER_EPHEMERALis set totrue, the runner automatically exits and unregisters after processing one job. If set tofalse, the runner does not exit after completing a job and continues waiting for and processing the next job.- The default is
false.
- The default is
-
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}Item Description 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.
| Item | Description |
|---|---|
| Name | Runner name |
| Status | Runner execution status - Idle: Waiting for workflow execution- Active: Running a workflow job- Offline: Runner is not running or the connection is lost |
| Number of tags | Number of tags configured for the runner. Click to view the tag list. |
| Created at | Date and time when the runner was first created |
| More button | Delete 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.
| Item | Description |
|---|---|
| Key | Unique name used to identify the repository variable |
| Value | Repository variable value used in workflows |