Getting started

Add a workflow to a repository, watch its first run and read its log.

Last updated 18 November 2026View as Markdown

You add a native-format workflow that prints a line on every push to main, push it, and read the run's log. Replace my-repo with your repository's name and repo-id with its id.

Prerequisites

  • A repository whose default branch is main (see Create a repository).
  • On the repository: git:GetRepository and git:PushRepository to commit the file; ci:ListRuns, ci:GetRun and ci:GetRunLogs to see the run and its log. For the console's check of the file before you commit it, ci:ListRuns on all of CI (rn:ews::<organization id>:ci:*).
  • For the CLI tab, a clone of the repository and the CLI signed in.

Step 1: Add the workflow

The run uses a platform machine: you pay for its job minutes from now on, for every run of this file.

  1. Open the repository, then open its CI tab.

  2. Choose Add a workflow.

  3. For File path, enter .dcloud/workflows/hello.yml.

  4. For Workflow file, enter:

    name: Hello
    on:
      push:
        branches: [main]
    jobs:
      hello:
        steps:
          - run: echo "Hello from CI"

    Under the file the page says "This file parses. It runs when its triggers match."

  5. Choose Commit to main.

  6. In Commit this workflow, keep or change the Commit message, then choose Commit.

The console returns to the CI tab, where the run appears.

Step 2: Watch the run

  1. On the repository's CI tab, open the run. It is titled with the commit's message, and the line under it begins Hello #, the run's number in the repository, then : Push.
  2. Select the job hello.

The run goes from Queued through Provisioning and Running to Succeeded, and the job's log shows Hello from CI.

Clean up

Delete the workflow file, so no later push starts a run.

Not available in Console. This tutorial removes the file with Git.

The run you made stays in the run list.

Next steps

Did this page help you?