Skip to content

Commit 526524e

Browse files
committed
fix: update workflows
1 parent 57b1303 commit 526524e

39 files changed

+1993
-990
lines changed

.github/.env.base

Lines changed: 64 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
#
1313
# Tools:
1414
# - GoFortress
15-
# - go-coverage
16-
# - go-pre-commit
17-
# - GitHub Workflows
15+
# - GoBroadcast
16+
# - GoCoverage
17+
# - GoPreCommit
18+
# - MAGE-X
19+
# - Gitleaks, Nancy, Govulncheck
20+
# - GitHub Workflows (Dependabot, Stale, Sync Labels, Auto-Merge, PR Management)
21+
# - Redis Service (optional)
1822
#
1923
# Maintainer: @mrz1836
2024
#
@@ -32,6 +36,15 @@ GO_PRIMARY_VERSION=1.24.x
3236
# Set to same as primary to test with single version only
3337
GO_SECONDARY_VERSION=1.24.x
3438

39+
# ================================================================================================
40+
# 📦 GO MODULE CONFIGURATION
41+
# ================================================================================================
42+
43+
# Go sum file location for dependency verification and caching
44+
# Default: go.sum (standard location in repository root)
45+
# Custom examples: lib/go.sum, backend/go.sum, services/api/go.sum
46+
GO_SUM_FILE=go.sum
47+
3548
# ================================================================================================
3649
# 🖥️ RUNNER CONFIGURATION
3750
# ================================================================================================
@@ -80,45 +93,42 @@ ENABLE_SECURITY_SCAN_NANCY=true # Dependency vulnerability checks
8093
ENABLE_GODOCS_PUBLISHING=true # Publish to pkg.go.dev on tag/releases
8194

8295
# ================================================================================================
83-
# ⚙️ TEST CONFIGURATION
96+
# 📦 ARTIFACT DOWNLOAD CONFIGURATION
8497
# ================================================================================================
8598

86-
# Test Output Configuration
87-
TEST_OUTPUT_MODE=SMART # Options: FULL, FAILURES_ONLY, SMART
88-
TEST_OUTPUT_SMART_THRESHOLD=500 # Switch to failure-only mode above this test count
89-
TEST_FAILURE_DETAIL_COUNT=50 # How many failures to show with full details
90-
TEST_FAILURE_ANNOTATION_COUNT=10 # GitHub annotations (hard limit is 50)
91-
TEST_OUTPUT_COMPRESS_ARTIFACTS=true # Gzip large outputs
92-
TEST_OUTPUT_ARTIFACT_RETENTION_DAYS=7 # Keep test artifacts for debugging
93-
94-
# Test Execution Timeouts
95-
TEST_TIMEOUT=30m # Go test timeout for standard tests
96-
TEST_TIMEOUT_RACE_COVER=30m # Timeout for tests with race+coverage (most intensive)
97-
TEST_TIMEOUT_UNIT=20m # Timeout for unit tests only
98-
TEST_TIMEOUT_FUZZ=5m # Timeout for fuzz tests
99+
# Artifact Download Resilience Settings
100+
ARTIFACT_DOWNLOAD_RETRIES=3 # Number of retry attempts for failed downloads
101+
ARTIFACT_DOWNLOAD_RETRY_DELAY=10 # Initial retry delay in seconds (uses exponential backoff)
102+
ARTIFACT_DOWNLOAD_TIMEOUT=300 # Download timeout in seconds (5 minutes)
103+
ARTIFACT_DOWNLOAD_CONTINUE_ON_ERROR=false # Continue workflow execution even if artifact download fails
99104

100105
# ================================================================================================
101-
# 🏃 BENCHMARK CONFIGURATION
106+
# ⚙️ BENCHMARK & TEST CONFIGURATION
102107
# ================================================================================================
103108

104109
# Benchmark execution timeout in minutes
105-
BENCHMARK_TIMEOUT=20 # Minutes
110+
BENCHMARK_TIMEOUT=20
106111

107-
# Benchmark mode
108-
BENCHMARK_MODE=quick # Options: quick, full, normal
112+
# Benchmark mode (Options: quick, full, normal)
113+
BENCHMARK_MODE=quick
114+
115+
# Test Execution Timeouts
116+
TEST_TIMEOUT=30m # Go test timeout for standard tests
117+
TEST_TIMEOUT_RACE_COVER=30m # Timeout for tests with race+coverage (most intensive)
118+
TEST_TIMEOUT_UNIT=20m # Timeout for unit tests only
119+
TEST_TIMEOUT_FUZZ=5m # Timeout for fuzz tests
109120

110121
# ================================================================================================
111-
# 📦 ARTIFACT DOWNLOAD CONFIGURATION
122+
# 📡 GO-BROADCAST CONFIGURATION
112123
# ================================================================================================
113124

114-
# Artifact Download Resilience Settings
115-
ARTIFACT_DOWNLOAD_RETRIES=3 # Number of retry attempts for failed downloads
116-
ARTIFACT_DOWNLOAD_RETRY_DELAY=10 # Initial retry delay in seconds (uses exponential backoff)
117-
ARTIFACT_DOWNLOAD_TIMEOUT=300 # Download timeout in seconds (5 minutes)
118-
ARTIFACT_DOWNLOAD_CONTINUE_ON_ERROR=false # Continue workflow execution even if artifact download fails
125+
# Automerge Labels Configuration
126+
# When using --automerge flag, these labels will be added to created PRs
127+
# Comma-separated list of labels to apply for automatic merging
128+
GO_BROADCAST_AUTOMERGE_LABELS=automerge
119129

120130
# ================================================================================================
121-
# 📊 COVERAGE SYSTEM CONFIGURATION (go-coverage)
131+
# 📊 GO-COVERAGE SYSTEM CONFIGURATION
122132
# ================================================================================================
123133

124134
# Coverage Provider Selection
@@ -130,7 +140,7 @@ GO_COVERAGE_PROVIDER=internal
130140
CODECOV_TOKEN_REQUIRED=false
131141

132142
# Go Coverage Tool Version
133-
GO_COVERAGE_VERSION=v1.1.11 # https://github.com/mrz1836/go-coverage
143+
GO_COVERAGE_VERSION=v1.1.12 # https://github.com/mrz1836/go-coverage
134144
GO_COVERAGE_USE_LOCAL=false # Use local version for development
135145

136146
# Core Coverage Settings
@@ -211,32 +221,23 @@ REDIS_HEALTH_CHECK_TIMEOUT=5 # Health check timeout in seconds
211221
# Redis Cache Configuration
212222
REDIS_CACHE_FORCE_PULL=false # Force pull Redis images even when cached (true/false)
213223

214-
# ================================================================================================
215-
# 🔧 TOOL VERSIONS
216-
# ================================================================================================
217-
218-
# Security Tools
219-
GITLEAKS_VERSION=8.28.0 # https://github.com/gitleaks/gitleaks/releases
220-
GOVULNCHECK_VERSION=v1.1.4 # https://pkg.go.dev/golang.org/x/vuln
221-
NANCY_VERSION=v1.0.51 # https://github.com/sonatype-nexus-community/nancy/releases
222-
223224
# ================================================================================================
224225
# 🪄 MAGE-X CONFIGURATION
225226
# ================================================================================================
226227

227-
MAGE_X_VERSION=v1.6.1 # https://github.com/mrz1836/mage-x/releases
228+
MAGE_X_VERSION=v1.7.6 # https://github.com/mrz1836/mage-x/releases
228229
MAGE_X_AUTO_DISCOVER_BUILD_TAGS=true # Enable auto-discovery of build tags
229230
MAGE_X_AUTO_DISCOVER_BUILD_TAGS_EXCLUDE=race,custom # Comma-separated list of tags to exclude
230231
MAGE_X_FORMAT_EXCLUDE_PATHS=vendor,node_modules,.git,.idea # Format exclusion paths (comma-separated directories to exclude from formatting)
231232
MAGE_X_GITLEAKS_VERSION=8.28.0 # https://github.com/gitleaks/gitleaks/releases
232-
MAGE_X_GOFUMPT_VERSION=v0.8.0 # https://github.com/mvdan/gofumpt/releases
233-
MAGE_X_GOLANGCI_LINT_VERSION=v2.4.0 # https://github.com/golangci/golangci-lint/releases
234-
MAGE_X_GORELEASER_VERSION=v2.12.0 # https://github.com/goreleaser/goreleaser/releases
233+
MAGE_X_GOFUMPT_VERSION=v0.9.1 # https://github.com/mvdan/gofumpt/releases
234+
MAGE_X_GOLANGCI_LINT_VERSION=v2.5.0 # https://github.com/golangci/golangci-lint/releases
235+
MAGE_X_GORELEASER_VERSION=v2.12.2 # https://github.com/goreleaser/goreleaser/releases
235236
MAGE_X_GOVULNCHECK_VERSION=v1.1.4 # https://pkg.go.dev/golang.org/x/vuln
236237
MAGE_X_GO_SECONDARY_VERSION=1.24.x # Secondary Go version for MAGE-X (also our secondary)
237238
MAGE_X_GO_VERSION=1.24.x # Primary Go version for MAGE-X (also our primary)
238239
MAGE_X_MOCKGEN_VERSION=v0.6.0 # https://github.com/uber-go/mock/releases
239-
MAGE_X_NANCY_VERSION=v1.0.51 # https://github.com/sonatype-nexus-community/nancy/releases
240+
MAGE_X_NANCY_VERSION=v1.0.52 # https://github.com/sonatype-nexus-community/nancy/releases
240241
MAGE_X_STATICCHECK_VERSION=2025.1.1 # https://github.com/dominikh/go-tools/releases
241242
MAGE_X_SWAG_VERSION=v1.16.6 # https://github.com/swaggo/swag/releases
242243
MAGE_X_YAMLFMT_VERSION=v0.17.2 # https://github.com/google/yamlfmt/releases
@@ -246,7 +247,7 @@ MAGE_X_YAMLFMT_VERSION=v0.17.2 # https://github.c
246247
# MAGE_X_GORELEASER_INSTALLED - Set to 'true' when goreleaser is available
247248
# MAGE_X_GORELEASER_CACHED_VERSION - Version of installed goreleaser
248249

249-
# Optional Overrides (uncomment to override defaults)
250+
# Optional Overrides (use .env.custom to override these defaults)
250251
# MAGE_X_BINARY_NAME=magex
251252
# MAGE_X_BUILD_TAGS=mage
252253
# MAGE_X_DOWNLOAD_BACKOFF=2.0
@@ -261,7 +262,7 @@ MAGE_X_YAMLFMT_VERSION=v0.17.2 # https://github.c
261262
# MAGE_X_VERBOSE=true
262263

263264
# ================================================================================================
264-
# 🔒 SECURITY CONFIGURATION
265+
# 🔒 SECURITY CONFIGURATION & TOOLS
265266
# ================================================================================================
266267

267268
# Gitleaks Configuration
@@ -273,12 +274,22 @@ GITLEAKS_CONFIG_FILE=
273274
# Nancy CVE Exclusions (known acceptable vulnerabilities)
274275
NANCY_EXCLUDES=CVE-2024-38513,CVE-2023-45142
275276

277+
# OSS Index Authentication for Nancy (optional)
278+
# Username (email) for OSS Index authentication - reduces rate limits and provides better vulnerability data
279+
# Get your API token from: https://ossindex.sonatype.org/user-token
280+
# Github Secret(s): OSSI_USERNAME and OSSI_TOKEN
281+
282+
# Security Tools
283+
GITLEAKS_VERSION=8.28.0 # https://github.com/gitleaks/gitleaks/releases
284+
GOVULNCHECK_VERSION=v1.1.4 # https://pkg.go.dev/golang.org/x/vuln
285+
NANCY_VERSION=v1.0.51 # https://github.com/sonatype-nexus-community/nancy/releases
286+
276287
# ================================================================================================
277288
# 🪝 PRE-COMMIT SYSTEM CONFIGURATION (go-pre-commit)
278289
# ================================================================================================
279290

280291
# Pre-Commit System
281-
GO_PRE_COMMIT_VERSION=v1.2.0 # https://github.com/mrz1836/go-pre-commit
292+
GO_PRE_COMMIT_VERSION=v1.3.4 # https://github.com/mrz1836/go-pre-commit
282293
GO_PRE_COMMIT_USE_LOCAL=false # Use local version for development
283294

284295
# System Settings
@@ -297,12 +308,12 @@ GO_PRE_COMMIT_MAX_FILES_OPEN=100
297308
GO_PRE_COMMIT_ALL_FILES=true
298309

299310
# Tool Versions
300-
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.4.0 # https://github.com/golangci/golangci-lint
301-
GO_PRE_COMMIT_FUMPT_VERSION=v0.8.0 # https://github.com/mvdan/gofumpt
311+
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.5.0 # https://github.com/golangci/golangci-lint
312+
GO_PRE_COMMIT_FUMPT_VERSION=v0.9.1 # https://github.com/mvdan/gofumpt
302313
GO_PRE_COMMIT_GOIMPORTS_VERSION=latest # https://github.com/golang/tools
303314

304-
# Build Configuration
305-
GO_PRE_COMMIT_BUILD_TAGS= # Build tags for golangci-lint and other tools
315+
# Build tags for golangci-lint and other tools
316+
GO_PRE_COMMIT_BUILD_TAGS=
306317

307318
# Individual Checks
308319
GO_PRE_COMMIT_ENABLE_FMT=true
@@ -383,10 +394,10 @@ AUTO_MERGE_ALLOWED_MERGE_TYPES=squash
383394
AUTO_MERGE_DELETE_BRANCH=true
384395
AUTO_MERGE_SKIP_DRAFT=true
385396
AUTO_MERGE_SKIP_WIP=true
386-
AUTO_MERGE_WIP_LABELS=work-in-progress,wip,do-not-merge
397+
AUTO_MERGE_WIP_LABELS=work-in-progress,wip,do-not-merge,requires-manual-review,security
387398
AUTO_MERGE_COMMENT_ON_ENABLE=true
388399
AUTO_MERGE_COMMENT_ON_DISABLE=true
389-
AUTO_MERGE_LABELS_TO_ADD=auto-merge-enabled
400+
AUTO_MERGE_LABELS_TO_ADD=automerge-enabled
390401
AUTO_MERGE_SKIP_BOT_PRS=true
391402

392403
# ================================================================================================
@@ -400,7 +411,7 @@ PR_MANAGEMENT_APPLY_SIZE_LABELS=true
400411
PR_MANAGEMENT_APPLY_TYPE_LABELS=true
401412
PR_MANAGEMENT_CLEAN_CACHE_ON_CLOSE=true
402413
PR_MANAGEMENT_DELETE_BRANCH_ON_MERGE=true
403-
PR_MANAGEMENT_PROTECTED_BRANCHES=master,main,development
414+
PR_MANAGEMENT_PROTECTED_BRANCHES=master,main,development,production
404415

405416
# PR Size Thresholds
406417
PR_MANAGEMENT_SIZE_XS_THRESHOLD=10

0 commit comments

Comments
 (0)