bakdata / ci-templates

Collection of reusable workflows and composite actions for Github
MIT License
4 stars 1 forks source link
github-actions

ci-templates

This is a collection of reusable workflows and composite actions for GitHub that Bakdata uses for open-source projects.

Using reusable workflows

You can use reusable workflows in this repository like this:

---
jobs:
  call-workflow-passing-data:
    uses: bakdata/ci-templates/.github/workflows/my-workflow.yaml@main
    with:
      foo: bar

Using composite actions

You can use composite actions in this repository like this:

---
steps:
  - uses: bakdata/ci-templates/actions/my-action@main
    with:
      foo: bar

Pre-commit

We are using pre-commit in this repository to automatically create the documentation. Make sure you install it here.

Also, follow the following steps to ensure that you can create the documentation locally:

install auto-doc which is the software used for documentation generation:

Use auto-doc

In case you used the GitHub repository to install auto-doc make sure you set the path to the executable file as an environment variable before running the pre-commit command:

export DOC_CMD=./auto-doc

Run pre-commit

Is mandatory to run pre-commit before pushing your changes. This can be done in two ways:

manually

Run the pre-commit every time before pushing your changes:

pre-commit run --all-files

automatically (strongly recommended)

You can let your pre-commit run automatically every time you execute a git commit command without having to do it on your own. To do so, run the following command locally just once in the root directory of this repository:

pre-commit install