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
- Host: GitHub
- URL: https://github.com/sudoblark/sudoblark.github-actions.library
- Owner: sudoblark
- License: bsd-3-clause
- Created: 2025-02-16T20:45:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T11:08:33.000Z (over 1 year ago)
- Last Synced: 2025-03-03T11:39:33.319Z (over 1 year ago)
- Topics: github-actions, library, yaml
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
sudoblark.github-actions.library
Template library of re-usable components for usage in GitHub Actions. - repo managed by sudoblark.terraform.github
Table of Contents
## About The Project
[](https://github.com/sudoblark/sudoblark.github-actions.library/actions/workflows/release.yaml)
[](https://github.com/sudoblark/sudoblark.github-actions.library/releases)
[](https://sudoblark.github.io/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).
### 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.
## 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/).
## Usage
See the live [docs](https://sudoblark.github.io/sudoblark.github-actions.library/latest)
for more details on usage.
## Contributing
Pull requests welcome. Fork the repository, create a feature branch, and submit a PR.
## License
BSD 3-Clause License. See LICENSE.txt for details.