An open API service indexing awesome lists of open source software.

https://github.com/sudoblark/sudoblark.github-actions.library

Template library of re-usable components for usage in GitHub Actions. - repo managed by sudoblark.terraform.github
https://github.com/sudoblark/sudoblark.github-actions.library

github-actions library yaml

Last synced: about 2 months ago
JSON representation

Template library of re-usable components for usage in GitHub Actions. - repo managed by sudoblark.terraform.github

Awesome Lists containing this project

README

          





Logo

sudoblark.github-actions.library


Template library of re-usable components for usage in GitHub Actions. - repo managed by sudoblark.terraform.github


Table of Contents



  1. About The Project


  2. Getting Started

  3. Usage

  4. Contributing

  5. License

## About The Project
[![CD](https://github.com/sudoblark/sudoblark.github-actions.library/actions/workflows/release.yaml/badge.svg)](https://github.com/sudoblark/sudoblark.github-actions.library/actions/workflows/release.yaml)
[![Version](https://img.shields.io/github/v/release/sudoblark/sudoblark.github-actions.library?label=action%20library&sort=semver)](https://github.com/sudoblark/sudoblark.github-actions.library/releases)
[![Docs](https://img.shields.io/badge/docs-latest-blue?logo=readthedocs)](https://sudoblark.github.io/sudoblark.github-actions.library/)
[![License](https://img.shields.io/github/license/sudoblark/sudoblark.github-actions.library)](https://github.com/sudoblark/sudoblark.github-actions.library/blob/main/LICENSE.txt)

This repo contains a setup of re-usable GitHub composition [actions](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-composite-action).

Specifically it is a library of semantically versioned](https://semver.org) actions, intended to be used as off-the-shelf, standardised,
building blocks for CI/CD processes involving GitHub Actions.

It fulfills the same function that [sudoblark.azure-devops.library](https://github.com/sudoblark/sudoblark.azure-devops.library)
does for Azure DevOps Pipelines.

In the instance that several of these composite actions, when combined, fulfill a use-case this is either done via:

- Direct instantation in a caller repo
- As a re-usable workflow via [sudoblark.github-actions.workflows](https://github.com/sudoblark/sudoblark.github-actions.workflows)

The live documentation base for this project is [here](https://sudoblark.github.io/sudoblark.github-actions.library/latest).

(back to top)

### Technical Documentation

mkdocs is used in order to auto-generation documentation. It is configured via
the [docs/mkdocs.yml](./docs/mkdocs.yml) file and - for the most part - doesn't
need to be altered.

In order to generation a local web server of documentation:

```sh
mkdocs serve
```

However, it should be noted that live versioned documentation is produced via
the appropriate workflow as per the CI/CD section of this document.

(back to top)

## Getting Started

Creating new re-usable composite actions it as simple as writing a YAML file. However, it's important to keep
a few things in mind:
- YAML files should denote _what_ the task does simply and plainly
- The folder structure should denote what the task interacts with
- Composite actions should be generalised, re-usable, and with a well-defined interface. Generally this means:
- Think about how the action(s) you're defining may be used in more than just the specific use-case you're trying to fulfill
- Avoid hard-coding, use inputs where possible.
- Document your inputs, make them discere where possible via `options`
- Document your outputs

A simple truism is thus:

_If I can't tell what the composite action does via its documented inputs and outputs, you haven't
documented it well enough_

The beauty of such a core library - like any other software - is that if we maintain the same interface, we are free
to chop and change the underlying implementation(s) as we wish. Whilst maintaining all
the other benefits of a [component-based architecture](https://www.mendix.com/blog/what-is-component-based-architecture/).

(back to top)

## Usage

See the live [docs](https://sudoblark.github.io/sudoblark.github-actions.library/latest)
for more details on usage.

(back to top)

## Contributing

Pull requests welcome. Fork the repository, create a feature branch, and submit a PR.

(back to top)

## License

BSD 3-Clause License. See LICENSE.txt for details.

(back to top)