Skip to content

Commit 7d2a960

Browse files
Copilotintel352
andauthored
Fix release workflow JSON output format for GitHub Actions (#15)
* Initial plan * Fix release workflow JSON output format for GitHub Actions Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix module-release workflow syntax errors causing chimux module failures Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Fix module input access for workflow_call in module-release workflow Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> * Add Go Doc badges to all module READMEs and main modules table Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: intel352 <77607+intel352@users.noreply.github.com>
1 parent 8945fcf commit 7d2a960

11 files changed

Lines changed: 43 additions & 27 deletions

File tree

.github/workflows/module-release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Module Release
2-
run-name: Module Release for ${{ github.event.inputs.module }} - ${{ github.event.inputs.releaseType }}
2+
run-name: Module Release for ${{ inputs.module || github.event.inputs.module }} - ${{ inputs.releaseType || github.event.inputs.releaseType }}
33

44
on:
55
workflow_dispatch:
@@ -65,7 +65,7 @@ jobs:
6565
MODULES=$(find modules -maxdepth 1 -mindepth 1 -type d -exec basename {} \; | jq -R . | jq -s .)
6666
{
6767
echo "modules<<EOF"
68-
echo "$MODULES_JSON"
68+
echo "$MODULES"
6969
echo "EOF"
7070
} >> $GITHUB_OUTPUT
7171
echo "Available modules: $MODULES"
@@ -82,7 +82,7 @@ jobs:
8282
- name: Determine release version
8383
id: version
8484
run: |
85-
MODULE="${{ github.event.inputs.module }}"
85+
MODULE="${{ inputs.module || github.event.inputs.module }}"
8686
echo "Selected module: $MODULE"
8787
8888
# Find the latest tag for this module
@@ -107,17 +107,17 @@ jobs:
107107
PATCH=$(echo $CURRENT_VERSION_NUM | cut -d. -f3)
108108
109109
# Calculate next version based on release type
110-
if [ "${{ github.event.inputs.releaseType }}" == "major" ]; then
110+
if [ "${{ inputs.releaseType || github.event.inputs.releaseType }}" == "major" ]; then
111111
NEXT_VERSION="v$((MAJOR + 1)).0.0"
112-
elif [ "${{ github.event.inputs.releaseType }}" == "minor" ]; then
112+
elif [ "${{ inputs.releaseType || github.event.inputs.releaseType }}" == "minor" ]; then
113113
NEXT_VERSION="v${MAJOR}.$((MINOR + 1)).0"
114114
else
115115
NEXT_VERSION="v${MAJOR}.${MINOR}.$((PATCH + 1))"
116116
fi
117117
118118
# Use manual version if provided
119-
if [ -n "${{ github.event.inputs.version }}" ]; then
120-
MANUAL_VERSION="${{ github.event.inputs.version }}"
119+
if [ -n "${{ inputs.version || github.event.inputs.version }}" ]; then
120+
MANUAL_VERSION="${{ inputs.version || github.event.inputs.version }}"
121121
# Ensure the 'v' prefix
122122
if [[ $MANUAL_VERSION != v* ]]; then
123123
MANUAL_VERSION="v${MANUAL_VERSION}"
@@ -175,15 +175,15 @@ jobs:
175175
--title "${{ steps.version.outputs.module }} ${{ steps.version.outputs.next_version }}" \
176176
--notes-file changelog.md \
177177
--repo ${{ github.repository }} \
178-
--latest=false --
178+
--latest=false
179179
180-
git tag ${{ steps.version.outputs.module }}/${{ steps.version.outputs.next_version }} $GITHUB_SHA --
181-
git push origin ${{ steps.version.outputs.module }}/${{ steps.version.outputs.next_version }}
180+
git tag ${{ steps.version.outputs.tag }}
181+
git push origin ${{ steps.version.outputs.tag }}
182182
183183
# Get all assets of the release and delete each one
184-
gh release view ${{ steps.version.outputs.tag }} --json assets --jq '.assets[].name' -- | while read asset; do
184+
gh release view ${{ steps.version.outputs.tag }} --json assets --jq '.assets[].name' | while read asset; do
185185
echo "Deleting asset: $asset"
186-
gh release delete-asset ${{ steps.version.outputs.tag }} "$asset" -y --
186+
gh release delete-asset ${{ steps.version.outputs.tag }} "$asset" -y
187187
done
188188
env:
189189
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ jobs:
182182
183183
# Clean up the modules list and output as JSON array for matrix
184184
if [ -n "$MODULES_WITH_CHANGES" ]; then
185-
# Convert space-separated list to JSON array
186-
MODULES_JSON=$(echo "$MODULES_WITH_CHANGES" | tr ' ' '\n' | grep -v '^$' | jq -R . | jq -s .)
185+
# Convert space-separated list to JSON array (compact format for GitHub Actions)
186+
MODULES_JSON=$(echo "$MODULES_WITH_CHANGES" | tr ' ' '\n' | grep -v '^$' | jq -R . | jq -s . -c)
187187
echo "modules_with_changes=$MODULES_JSON" >> $GITHUB_OUTPUT
188188
echo "Modules with changes: $MODULES_WITH_CHANGES"
189189
else

modules/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ This directory contains all the pre-built modules available in the Modular frame
66

77
## 📋 Module Directory
88

9-
| Module | Description | Configuration | Dependencies |
10-
|----------------------------|------------------------------------------|---------------|----------------------------------------|
11-
| [auth](./auth) | Authentication and authorization with JWT, sessions, password hashing, and OAuth2/OIDC support | [Yes](./auth/config.go) | - |
12-
| [cache](./cache) | Multi-backend caching with Redis and in-memory support | [Yes](./cache/config.go) | - |
13-
| [chimux](./chimux) | Chi router integration with middleware support | [Yes](./chimux/config.go) | - |
14-
| [database](./database) | Database connectivity and SQL operations with multiple driver support | [Yes](./database/config.go) | - |
15-
| [eventbus](./eventbus) | Asynchronous event handling and pub/sub messaging | [Yes](./eventbus/config.go) | - |
16-
| [httpclient](./httpclient) | Configurable HTTP client with connection pooling, timeouts, and verbose logging | [Yes](./httpclient/config.go) | - |
17-
| [httpserver](./httpserver) | HTTP/HTTPS server with TLS support, graceful shutdown, and configurable timeouts | [Yes](./httpserver/config.go) | - |
18-
| [jsonschema](./jsonschema) | JSON Schema validation services | No | - |
19-
| [letsencrypt](./letsencrypt) | SSL/TLS certificate automation with Let's Encrypt | [Yes](./letsencrypt/config.go) | Works with httpserver |
20-
| [reverseproxy](./reverseproxy) | Reverse proxy with load balancing, circuit breaker, and health monitoring | [Yes](./reverseproxy/config.go) | - |
21-
| [scheduler](./scheduler) | Job scheduling with cron expressions and worker pools | [Yes](./scheduler/config.go) | - |
9+
| Module | Description | Configuration | Dependencies | Go Docs |
10+
|----------------------------|------------------------------------------|---------------|----------------------------------------|---------|
11+
| [auth](./auth) | Authentication and authorization with JWT, sessions, password hashing, and OAuth2/OIDC support | [Yes](./auth/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/auth.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/auth) |
12+
| [cache](./cache) | Multi-backend caching with Redis and in-memory support | [Yes](./cache/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/cache.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/cache) |
13+
| [chimux](./chimux) | Chi router integration with middleware support | [Yes](./chimux/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/chimux.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/chimux) |
14+
| [database](./database) | Database connectivity and SQL operations with multiple driver support | [Yes](./database/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/database.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/database) |
15+
| [eventbus](./eventbus) | Asynchronous event handling and pub/sub messaging | [Yes](./eventbus/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/eventbus.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/eventbus) |
16+
| [httpclient](./httpclient) | Configurable HTTP client with connection pooling, timeouts, and verbose logging | [Yes](./httpclient/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/httpclient.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/httpclient) |
17+
| [httpserver](./httpserver) | HTTP/HTTPS server with TLS support, graceful shutdown, and configurable timeouts | [Yes](./httpserver/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/httpserver.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/httpserver) |
18+
| [jsonschema](./jsonschema) | JSON Schema validation services | No | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/jsonschema.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/jsonschema) |
19+
| [letsencrypt](./letsencrypt) | SSL/TLS certificate automation with Let's Encrypt | [Yes](./letsencrypt/config.go) | Works with httpserver | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/letsencrypt.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/letsencrypt) |
20+
| [reverseproxy](./reverseproxy) | Reverse proxy with load balancing, circuit breaker, and health monitoring | [Yes](./reverseproxy/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/reverseproxy.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/reverseproxy) |
21+
| [scheduler](./scheduler) | Job scheduling with cron expressions and worker pools | [Yes](./scheduler/config.go) | - | [![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/scheduler.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/scheduler) |
2222

2323
## 🚀 Quick Start
2424

modules/auth/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Authentication Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/auth.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/auth)
4+
35
The Authentication module provides comprehensive authentication capabilities for the Modular framework, including JWT tokens, session management, password hashing, and OAuth2/OIDC integration.
46

57
## Features

modules/cache/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Cache Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/cache.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/cache)
4+
35
The Cache Module provides caching functionality for Modular applications. It offers different cache backend options including in-memory and Redis (placeholder implementation).
46

57
## Features

modules/chimux/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# chimux Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/chimux.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/chimux)
4+
35
A module for the [Modular](https://github.com/GoCodeAlone/modular) framework.
46

57
## Overview

modules/eventbus/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# EventBus Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/eventbus.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/eventbus)
4+
35
The EventBus Module provides a publish-subscribe messaging system for Modular applications. It enables decoupled communication between components through a flexible event-driven architecture.
46

57
## Features

modules/httpclient/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HTTP Client Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/httpclient.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/httpclient)
4+
35
This module provides a configurable HTTP client service that can be used by other modules in the modular framework. It supports configurable connection pooling, timeouts, and optional verbose logging of HTTP requests and responses.
46

57
## Features

modules/httpserver/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HTTP Server Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/httpserver.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/httpserver)
4+
35
This module provides HTTP/HTTPS server capabilities for the modular framework. It handles listening on a specified port, TLS configuration, and server timeouts.
46

57
## Features

modules/reverseproxy/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Reverse Proxy Module
22

3+
[![Go Reference](https://pkg.go.dev/badge/github.com/GoCodeAlone/modular/modules/reverseproxy.svg)](https://pkg.go.dev/github.com/GoCodeAlone/modular/modules/reverseproxy)
4+
35
A module for the [Modular](https://github.com/GoCodeAlone/modular) framework that provides a flexible reverse proxy with advanced routing capabilities.
46

57
## Overview

0 commit comments

Comments
 (0)