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

https://github.com/devantler-tech/reusable-workflows

Reusable workflows designed to streamline CI/CD processes.
https://github.com/devantler-tech/reusable-workflows

ci-cd

Last synced: about 1 month ago
JSON representation

Reusable workflows designed to streamline CI/CD processes.

Awesome Lists containing this project

README

          

# DevantlerTech GitHub Reusable Workflows 🚀

> [!NOTE]
> To see DevantlerTech's Actions, please visit the [devantler-tech/actions](https://github.com/devantler-tech/actions) repository.

Welcome to the DevantlerTech GitHub Reusable Workflows repository! This repository contains [reusable workflows](#reusable-workflows) designed to streamline your CI/CD processes. These actions are used across all DevantlerTech projects, ensuring consistency and efficiency.

The below diagram illustrates the relationship between GitHub Workflows and GitHub Actions.

```mermaid
---
title: GitHub Actions Relationship Diagram
---
flowchart TD
A[Workflows] --> B[Jobs]
B --> C([***Reusable Workflows***])
B --> D[Steps]
C --> D
C --> B
D --> E[Actions]
E -.- F([Composite Actions])
F --> D
E -.- G([JavaScript Actions])
E -.- H([Docker Container Actions])
```

## Reusable Workflows

[Reusable workflows](https://docs.github.com/en/actions/how-tos/sharing-automations/reuse-workflows#creating-a-reusable-workflow) are designed to encapsulate common CI/CD patterns that can be shared across multiple repositories. They allow you to define a workflow once and reuse it in the job-scope of other workflows. This reduces duplication and enables building generic workflows for common tasks.

### CD - Cluster Bootstrap

Click to expand

[.github/workflows/cd-cluster-bootstrap.yaml](.github/workflows/cd-cluster-bootstrap.yaml) is a workflow used to bootstrap a cluster on the DevantlerTech platform. It installs core components like Cilium and Flux.

#### Usage

To use this reusable workflow, you can include it in your workflow file as follows:

```yaml
jobs:
bootstrap-cluster:
uses: devantler-tech/reusable-workflows/.github/workflows/cd-cluster-bootstrap.yaml@{ref} # ref
secrets:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
with:
DEPLOYMENT_ENV: dev
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|------------------|----------------|---------|----------|------------------------|
| `KUBE_CONFIG` | Secret | - | ✅ | Kubernetes config file |
| `SOPS_AGE_KEY` | Secret | - | ✅ | Age key for SOPS |
| `DEPLOYMENT_ENV` | Input (string) | `dev` | ✅ | Deployment environment |

### CD - .NET Application Publish

Click to expand

[.github/workflows/cd-dotnet-application-publish.yaml](.github/workflows/cd-dotnet-application-publish.yaml) is a workflow used to publish .NET applications.

#### Usage

```yaml
jobs:
publish-application:
uses: devantler-tech/reusable-workflows/.github/workflows/cd-dotnet-application-publish.yaml@{ref} # ref
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|-----------------|--------|---------|----------|---------------|
| `NUGET_API_KEY` | Secret | - | ✅ | NuGet API key |

### CD - .NET Library Publish

Click to expand

[.github/workflows/cd-dotnet-library-publish.yaml](.github/workflows/cd-dotnet-library-publish.yaml) is a workflow used to publish .NET libraries to NuGet and GHCR.

#### Usage

```yaml
jobs:
publish-library:
uses: devantler-tech/reusable-workflows/.github/workflows/cd-dotnet-library-publish.yaml@{ref} # ref
secrets:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|-----------------|--------|---------|----------|---------------|
| `NUGET_API_KEY` | Secret | - | ✅ | NuGet API key |

### CD - GitOps Deploy

Click to expand

[.github/workflows/cd-gitops-deploy.yaml](.github/workflows/cd-gitops-deploy.yaml) is a workflow used to deploy applications using GitOps with Flux.

#### Usage

```yaml
jobs:
gitops-deploy:
uses: devantler-tech/reusable-workflows/.github/workflows/cd-gitops-deploy.yaml@{ref} # ref
secrets:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
with:
DEPLOYMENT_ENV: dev
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|------------------|----------------|---------|----------|------------------------|
| `KUBE_CONFIG` | Secret | - | ✅ | Kubernetes config file |
| `SOPS_AGE_KEY` | Secret | - | ✅ | Age key for SOPS |
| `DEPLOYMENT_ENV` | Input (string) | `dev` | ✅ | Deployment environment |

### CD - Pages Publish

Click to expand

[.github/workflows/cd-pages-publish.yaml](.github/workflows/cd-pages-publish.yaml) is a workflow used to build and publish a Jekyll site to GitHub Pages.

#### Usage

```yaml
jobs:
pages:
uses: devantler-tech/reusable-workflows/.github/workflows/cd-pages-publish.yaml@{ref} # ref
with:
ruby-version: "3.3" # optional
jekyll-env: production # optional
extra-build-args: "" # optional, e.g. '--future'
working-directory: "." # optional, e.g. 'docs' if Jekyll site is in a subdirectory
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|---------------------|----------------|--------------|----------|-----------------------------------------------------------------|
| `ruby-version` | Input (string) | `3.3` | ❌ | Ruby version to install |
| `jekyll-env` | Input (string) | `production` | ❌ | Jekyll environment |
| `extra-build-args` | Input (string) | `""` | ❌ | Extra args appended before the automatically supplied --baseurl |
| `working-directory` | Input (string) | `"."` | ❌ | Working directory for the Jekyll site (e.g., 'docs') |

#### Outputs

| Key | Description |
|------------|-------------------------|
| `page_url` | Deployed Pages site URL |

### CI - Auto Merge

Click to expand

[.github/workflows/ci-auto-merge.yaml](.github/workflows/ci-auto-merge.yaml) is a workflow that automatically merges pull requests from trusted bots and maintainers.

#### Usage

```yaml
jobs:
auto-merge:
uses: devantler-tech/reusable-workflows/.github/workflows/ci-auto-merge.yaml@{ref} # ref
```

### CI - .NET Test

Click to expand

[.github/workflows/ci-dotnet-test.yaml](.github/workflows/ci-dotnet-test.yaml) is a workflow used to test .NET solutions or projects across multiple operating systems.

#### Usage

```yaml
jobs:
dotnet-test:
uses: devantler-tech/reusable-workflows/.github/workflows/ci-dotnet-test.yaml@{ref} # ref
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|-----------------|--------|---------|----------|---------------|
| `CODECOV_TOKEN` | Secret | - | ✅ | Codecov token |

### CI - Docs

Click to expand

[.github/workflows/ci-docs.yaml](.github/workflows/ci-docs.yaml) is a workflow used to lint documentation files using the MegaLinter documentation flavor.

#### Usage

```yaml
jobs:
docs-lint:
uses: devantler-tech/reusable-workflows/.github/workflows/ci-docs.yaml@{ref} # ref
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|-------------------|--------|---------|----------|------------------------|
| `APP_PRIVATE_KEY` | Secret | - | ✅ | GitHub App private key |

### CI - Go

Click to expand

[.github/workflows/ci-go.yaml](.github/workflows/ci-go.yaml) is a workflow used to lint and test Go projects across multiple operating systems.

#### Features

- **Automated Linting**: Runs `golangci-lint` and `mega-linter` to ensure code quality
- **Auto-fix**: Automatically applies linter fixes and commits them
- **Copilot Integration**: When linting fails, automatically prompts Copilot on the PR to fix the remaining issues

#### Usage

```yaml
jobs:
go-test:
uses: devantler-tech/reusable-workflows/.github/workflows/ci-go.yaml@{ref} # ref
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
with:
working-directory: "./" # optional
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|---------------------|----------------|---------|----------|----------------------------------------------------------------------|
| `CODECOV_TOKEN` | Secret | - | ❌ | Codecov token |
| `APP_PRIVATE_KEY` | Secret | - | ✅ | GitHub App private key for authenticating the workflow |
| `working-directory` | Input (string) | `./` | ❌ | Working directory for Go commands (e.g., 'src' if go.mod is in src/) |

### CI - GitOps Test

Click to expand

[.github/workflows/ci-gitops-test.yaml](.github/workflows/ci-gitops-test.yaml) is a workflow used to test GitOps configurations with Flux.

#### Usage

```yaml
jobs:
gitops-test:
uses: devantler-tech/reusable-workflows/.github/workflows/ci-gitops-test.yaml@{ref} # ref
secrets:
KSAIL_SOPS_KEY: ${{ secrets.KSAIL_SOPS_KEY }}
with:
HOSTS_FILE: hosts
ROOT_CA_CERT_FILE: root-ca.crt
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|---------------------|----------------|---------|----------|----------------------------------|
| `KSAIL_SOPS_KEY` | Secret | - | ❌ | SOPS Age key for KSail |
| `HOSTS_FILE` | Input (string) | - | ❌ | Path to hosts file for testing |
| `ROOT_CA_CERT_FILE` | Input (string) | - | ❌ | Path to root CA certificate file |

### CI - GitOps Validate

Click to expand

[.github/workflows/ci-gitops-validate.yaml](.github/workflows/ci-gitops-validate.yaml) is a workflow used to validate GitOps cluster configurations.

#### Usage

```yaml
jobs:
gitops-validate:
uses: devantler-tech/reusable-workflows/.github/workflows/ci-gitops-validate.yaml@{ref} # ref
```

### Release

Click to expand

[.github/workflows/release.yaml](.github/workflows/release.yaml) is a workflow used to create releases using semantic-release.

#### Usage

```yaml
jobs:
release:
uses: devantler-tech/reusable-workflows/.github/workflows/release.yaml@{ref} # ref
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|-------------------|--------|---------|----------|------------------------|
| `APP_PRIVATE_KEY` | Secret | - | ✅ | GitHub App private key |

### Sync Cluster Policies

Click to expand

[.github/workflows/sync-cluster-policies.yaml](.github/workflows/sync-cluster-policies.yaml) is a workflow used to sync upstream Kyverno policies to a target directory.

#### Usage

```yaml
jobs:
sync-cluster-policies:
uses: devantler-tech/reusable-workflows/.github/workflows/sync-cluster-policies.yaml@{ref} # ref
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
with:
KYVERNO_POLICIES_DIR: policies/kyverno
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|------------------------|----------------|---------|----------|---------------------------------------|
| `APP_PRIVATE_KEY` | Secret | - | ✅ | GitHub App private key |
| `KYVERNO_POLICIES_DIR` | Input (string) | - | ✅ | Directory to sync Kyverno policies to |

### TODOs

Click to expand

[.github/workflows/todos.yaml](.github/workflows/todos.yaml) is a workflow used to scan for TODOs in code and create GitHub issues.

#### Usage

```yaml
jobs:
todos:
uses: devantler-tech/reusable-workflows/.github/workflows/todos.yaml@{ref} # ref
secrets:
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
```

#### Secrets and Inputs

| Key | Type | Default | Required | Description |
|-------------------|--------|---------|----------|------------------------|
| `APP_PRIVATE_KEY` | Secret | - | ✅ | GitHub App private key |

### Zizmor

Click to expand

[.github/workflows/zizmor.yaml](.github/workflows/zizmor.yaml) is a workflow used to perform static analysis on GitHub Actions workflows.

#### Usage

```yaml
jobs:
zizmor:
uses: devantler-tech/reusable-workflows/.github/workflows/zizmor.yaml@{ref} # ref
```