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

https://github.com/thre4dripper/reusable-atomic-workflows

A comprehensive collection of reusable GitHub Actions workflows for modern development - CI/CD, quality checks, documentation generation, and deployment automation.
https://github.com/thre4dripper/reusable-atomic-workflows

actions atomic reusable workflows

Last synced: 2 months ago
JSON representation

A comprehensive collection of reusable GitHub Actions workflows for modern development - CI/CD, quality checks, documentation generation, and deployment automation.

Awesome Lists containing this project

README

          

# ๐Ÿ”„ Reusable GitHub Actions Workflows

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

[![GitHub stars](https://img.shields.io/github/stars/Thre4dripper/Reusable-Atomic-Workflows?style=social)](https://github.com/Thre4dripper/Reusable-Atomic-Workflows/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/Thre4dripper/Reusable-Atomic-Workflows?style=social)](https://github.com/Thre4dripper/Reusable-Atomic-Workflows/network/members)

A comprehensive collection of reusable GitHub Actions workflows designed to
streamline CI/CD processes across projects. These workflows are built with best
practices in mind and can be easily integrated into any repository.

## ๐Ÿ“‹ Table of Contents

- [About](#about)
- [Available Workflows](#available-workflows)
- [Quick Start](#quick-start)
- [Folder Structure](#folder-structure)
- [Usage Examples](#usage-examples)
- [Contributing](#contributing)
- [Security](#security)
- [License](#license)
- [Support](#support)

## ๐Ÿš€ About

This repository contains a curated collection of reusable GitHub Actions
workflows that can help you:

- โšก **Speed up development** with pre-built CI/CD pipelines
- ๐Ÿ”’ **Enhance security** with automated security checks
- ๐Ÿ“Š **Improve code quality** with automated testing and linting
- ๐Ÿš€ **Streamline deployments** with reliable deployment workflows
- ๐Ÿ”ง **Standardize processes** across multiple repositories

All workflows are designed to be:

- **Modular**: Easy to customize for specific needs
- **Secure**: Following security best practices
- **Efficient**: Optimized for performance and cost
- **Well-documented**: Clear usage instructions and examples

## ๐Ÿ“ฆ Available Workflows

> โšก **Auto-Generated** โšก
>
> This section is automatically updated whenever workflows are added, modified, or removed.
> The documentation reflects the current state of all reusable workflows in this repository.

### ๐Ÿงช Testing

| Workflow Name | Description | Inputs | Outputs | Secrets |
|:-------------|:------------|:-------|:--------|:--------|
| **[Unit Tests Worker](./.github/workflows/test-unit.yml)** | This workflow runs unit tests using a specified
package manager and commands. | `package-manager`
`test-command`
`coverage-command` | *None* | *None* |

### ๐Ÿ”ง Code Quality

| Workflow Name | Description | Inputs | Outputs | Secrets |
|:-------------|:------------|:-------|:--------|:--------|
| **[TypeScript Type Checker](./.github/workflows/quality-typecheck.yml)** | This workflow checks TypeScript types using a
specified package manager. | `package-manager` | *None* | *None* |
| **[Sonar Analysis](./.github/workflows/quality-sonarqube.yml)** | This workflow uses the SonarQube GitHub Action to
perform code analysis with SonarQube Cloud. | *None* | *None* | `sonar-token`
`workflow-token` |
| **[Qodana](./.github/workflows/quality-qodana-code.yml)** | This workflow uses the Qodana GitHub Action to
perform code analysis with Qodana Cloud. | `qodana-endpoint` | *None* | `qodana-token` |
| **[Lint Checker](./.github/workflows/quality-lint.yml)** | This workflow checks linting using a specified
package manager and command. | `package-manager`
`lint-check-command` | *None* | *None* |
| **[Code Formatter](./.github/workflows/quality-format.yml)** | This workflow checks and applies code formatting
using a specified package manager and commands. | `package-manager`
`format-check-command`
`format-fix-command` | *None* | `workflow-token` |

### ๐Ÿš€ Deployment

| Workflow Name | Description | Inputs | Outputs | Secrets |
|:-------------|:------------|:-------|:--------|:--------|
| **[EC2 Deployment](./.github/workflows/deploy-node-ec2.yml)** | Deploys a Node.js application to AWS EC2 using
SSH with build verification | `node-version`
`package-manager`
`install-command`
`build-command`
`build-output-dir`
`repository-url`
`deploy-directory`
`pm2-app-name`
`pre-deploy-cleanup` | *None* | `ssh-private-key`
`ec2-public-ip`
`env-file` |
| **[Build Release APK](./.github/workflows/build-release-apk.yml)** | Generate a release APK for an Android project
using customizable inputs. | `java-version`
`java-distribution`
`gradle-cache`
`checkout-ref`
`secret-files-artifact-name`
`secret-files-path`
`gradle-build-command`
`apk-output-path`
`artifact-name`
`artifact-retention-days`
`should-build-condition`
`include-additional-files`
`additional-files-path` | *None* | `release-store-password`
`release-key-alias`
`release-key-password` |
| **[Build Debug APK](./.github/workflows/build-debug-apk.yml)** | Generate a debug APK for an Android project using
customizable inputs. | `java-version`
`java-distribution`
`gradle-cache`
`checkout-ref`
`secret-files-artifact-name`
`secret-files-path`
`gradle-build-command`
`apk-output-path`
`artifact-name`
`artifact-retention-days` | *None* | *None* |

## ๐Ÿ—๏ธ Workflows Folder Structure

> โšก **Auto-Generated** โšก
>
> This folder structure is automatically scanned and updated to reflect the current repository layout.
> It shows all workflows and actions with their types (reusable/internal).

```
.github/
โ”œโ”€โ”€ workflows/ # GitHub Actions Workflows
โ”‚ โ”œโ”€โ”€ # โš™๏ธ Internal
โ”‚ โ”œโ”€โ”€ _docs.yml (internal)
โ”‚ โ”œโ”€โ”€ _format.yml (internal)
โ”‚ โ”‚
โ”‚ โ”œโ”€โ”€ # ๐Ÿš€ Deployment
โ”‚ โ”œโ”€โ”€ build-debug-apk.yml (reusable)
โ”‚ โ”œโ”€โ”€ build-release-apk.yml (reusable)
โ”‚ โ”œโ”€โ”€ deploy-node-ec2.yml (reusable)
โ”‚ โ”‚
โ”‚ โ”œโ”€โ”€ # ๐Ÿ”ง Code Quality
โ”‚ โ”œโ”€โ”€ quality-format.yml (reusable)
โ”‚ โ”œโ”€โ”€ quality-lint.yml (reusable)
โ”‚ โ”œโ”€โ”€ quality-qodana-code.yml (reusable)
โ”‚ โ”œโ”€โ”€ quality-sonarqube.yml (reusable)
โ”‚ โ”œโ”€โ”€ quality-typecheck.yml (reusable)
โ”‚ โ”‚
โ”‚ โ”œโ”€โ”€ # ๐Ÿงช Testing
โ”‚ โ”œโ”€โ”€ test-unit.yml (reusable)
โ””โ”€โ”€ actions/ # Custom Composite Actions
โ””โ”€โ”€ web-dependencies-setup/
โ””โ”€โ”€ action.yml
```

## โšก Quick Start

### Using a Reusable Workflow

1. **Create a workflow file** in your repository at `.github/workflows/`
2. **Reference the reusable workflow** using the following syntax:

```yaml
name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]

jobs:
build-and-test:
uses: Thre4dripper/Reusable-Atomic-Workflows/.github/workflows/build-test-lint.yml@main
with:
node-version: '18'
run-tests: true
run-lint: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
```

### Workflow Input Parameters

Each workflow accepts various input parameters to customize behavior:

```yaml
# Example with all common parameters
jobs:
my-job:
uses: Thre4dripper/Reusable-Atomic-Workflows/.github/workflows/[workflow-name].yml@main
with:
# Environment settings
environment: 'production'

# Language/Framework specific
node-version: '18'
python-version: '3.9'
java-version: '11'

# Feature flags
run-tests: true
run-lint: true
generate-coverage: true

# Deployment settings
deploy-environment: 'staging'
docker-registry: 'ghcr.io'
```

## ๐Ÿ“– Usage Examples

### Example 1: Node.js Application CI/CD

```yaml
name: Node.js CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test-and-build:
uses: Thre4dripper/Reusable-Atomic-Workflows/.github/workflows/build-test-lint.yml@main
with:
node-version: '18'
package-manager: 'npm'
run-tests: true
run-lint: true
generate-coverage: true
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
```

### Example 2: Docker Multi-Platform Build

```yaml
name: Docker Build and Publish
on:
release:
types: [published]

jobs:
docker-build:
uses: Thre4dripper/Reusable-Atomic-Workflows/.github/workflows/docker-publish.yml@main
with:
image-name: 'my-app'
platforms: 'linux/amd64,linux/arm64'
push-to-registry: true
secrets:
registry-username: ${{ secrets.DOCKER_USERNAME }}
registry-password: ${{ secrets.DOCKER_PASSWORD }}
```

### Example 3: Security Scanning

```yaml
name: Security Scan
on:
schedule:
- cron: '0 2 * * 1' # Weekly on Monday at 2 AM
push:
branches: [main]

jobs:
security-check:
uses: Thre4dripper/Reusable-Atomic-Workflows/.github/workflows/security-scan.yml@main
with:
scan-type: 'full'
fail-on-severity: 'high'
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
snyk-token: ${{ secrets.SNYK_TOKEN }}
```

## ๐Ÿค Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md)
for details on how to:

- ๐Ÿ› Report bugs
- ๐Ÿ’ก Suggest new workflows
- ๐Ÿ”ง Submit improvements
- ๐Ÿ“ Improve documentation

### Quick Contribution Steps

1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature/new-workflow`
3. **Make your changes** following our coding standards
4. **Test your workflow** thoroughly
5. **Submit a pull request** with a clear description

## ๐Ÿ”’ Security

Security is a top priority. If you discover a security vulnerability, please see
our [Security Policy](SECURITY.md) for responsible disclosure guidelines.

### Security Features

- ๐Ÿ” **Secret scanning** in all workflows
- ๐Ÿ›ก๏ธ **Dependency vulnerability checking**
- ๐Ÿ“‹ **Security-first defaults**
- ๐Ÿ” **Regular security audits**

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
for details.

## ๐Ÿ†˜ Support

- ๐Ÿ“– **Documentation**: Check our workflow-specific README files
- ๐Ÿ› **Issues**:
[Report bugs or request features](https://github.com/Thre4dripper/Reusable-Atomic-Workflows/issues)
- ๐Ÿ’ฌ **Discussions**:
[Join community discussions](https://github.com/Thre4dripper/Reusable-Atomic-Workflows/discussions)
- โญ **Star the repo** if you find it useful!

## ๐Ÿ™ Acknowledgments

- GitHub Actions team for the amazing platform
- Open source community for inspiration and best practices
- Contributors who help improve these workflows

---

**[โฌ† Back to Top](#-reusable-github-actions-workflows)**

Made with โค๏ธ by [Ijlal Ahmad](https://github.com/Thre4dripper)