Github Actions

Github Actions #

To use Kosli in Github Actions workflows, you can use the kosli CLI setup action to install the CLI on your Github Actions Runner. Then, you can use all the CLI commands in your workflows.

Here is an example Github Actions workflow snippet using the Kosli declare pipeline command:

    runs-on: ubuntu-latest
      KOSLI_API_TOKEN: ${{ secrets.MY_KOSLI_API_TOKEN }}
      KOSLI_OWNER: my-org
      - name: setup kosli
        uses: kosli-dev/setup-cli-action@v1
      - name: declare pipeline
        run: kosli pipeline declare --pipeline my-pipeline -t pull-request,artifact,test
Note that all CLI command flags can be set as environment variables by adding the the KOSLI_ prefix and capitalizing them. In the example above, both --api-token and --owner flags were set from environment variables.

Defaulted CLI flags in Github Actions #

The following commands flags are defaulted when the Kosli CLI is run inside a Github Actions workflow: