Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
image

GitHub Action

LikeC4

v1.73.0

LikeC4

image

LikeC4

LikeC4 GitHub Action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: LikeC4

uses: likec4/[email protected]

Learn more about this action in likec4/actions

Choose a version

LikeC4 Github Action

GitHub release

This action wraps likec4 CLI as a GitHub Action.

Usage

Build website:

...
    steps:
      - uses: actions/checkout@v4

      - name: build
        uses: likec4/actions@v1
        with:
          action: build
          path: src/likec4
          output: dist
          base: baseurl

      - name: upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: likec4
          path: dist

Export diagrams to PNG:

...
    steps:
      - name: export diagrams
        uses: likec4/actions@v1
        with:
          export: png
          path: src/likec4
          output: images
          use-dot-bin: 'true'

Code generation:

...
    steps:
      - name: code generation
        uses: likec4/actions@v1
        with:
          codegen: react
          output: __generated__/likec4.tsx

Inputs

Name Description
action Action to perform (build / export / codegen)
export Can be used instead of action: export
codegen Can be used instead of action: codegen, same values as in cli
path Path in repository to likec4 sources, root otherwise
output Output directory/file
base Custom baseUrl for website
use-dot-bin if 'true' will use dot binary of graphviz
webcomponent-prefix same as in cli

All inputs are optional.
By default builds a website to dist directory.

Report Bugs

Report bugs at https://github.com/likec4/actions/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your workflow that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.