|
| 1 | +# ------------------------------------------------------------------------------------ |
| 2 | +# Shared Environment Variables for CI/CD Workflows |
| 3 | +# |
| 4 | +# Purpose: Centralized configuration for all GitHub Actions workflows. |
| 5 | +# This file contains static environment variables used across multiple workflows. |
| 6 | +# |
| 7 | +# Maintainer: @mrz1836 |
| 8 | +# |
| 9 | +# ------------------------------------------------------------------------------------ |
| 10 | + |
| 11 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 12 | +# ENV: Custom Project Variables |
| 13 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 14 | +CUSTOM_VAR=false # Add your own custom variables here for use in workflows |
| 15 | + |
| 16 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 17 | +# ENV: GitHub Token Configuration |
| 18 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 19 | +# Use 'GH_PAT_TOKEN' for private repos or higher API rate limits (5000/hour). |
| 20 | +# The default fallback is 'GITHUB_TOKEN' (rate-limited to 1000/hour). |
| 21 | +PREFERRED_GITHUB_TOKEN=GH_PAT_TOKEN # Change this per project as needed |
| 22 | + |
| 23 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 24 | +# ENV: Go Version Matrix |
| 25 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 26 | +# If you set both primary and secondary versions to the same value, the workflow will only run once for that version. |
| 27 | +GO_PRIMARY_VERSION=1.24.x # Main Go version used by primary jobs and runners |
| 28 | +GO_SECONDARY_VERSION=1.24.x # Additional version for compatibility testing (or if the go.mod version != GO_PRIMARY_VERSION) |
| 29 | + |
| 30 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 31 | +# ENV: OS and Runner Configuration |
| 32 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 33 | +# This can only be Linux or Mac (there is no support for Windows at this time). |
| 34 | +# Careful using Mac, it's expensive! See: https://docs.github.com/en/billing/managing-billing-for-your-products/about-billing-for-github-actions#minute-multipliers |
| 35 | +PRIMARY_RUNNER=ubuntu-24.04 # This is the primary runner and also used for jobs that require Linux (options are: ubuntu-24.04, ubuntu-22.04, macos-15) |
| 36 | +SECONDARY_RUNNER=ubuntu-24.04 # Set identical to PRIMARY_RUNNER if you want a single test runner (options are: ubuntu-24.04, ubuntu-22.04, macos-15) |
| 37 | + |
| 38 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 39 | +# ENV: Feature Flags |
| 40 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 41 | +ENABLE_CODE_COVERAGE=true # Enable code coverage reporting (upload to Codecov) |
| 42 | +ENABLE_FUZZ_TESTING=true # Enable fuzz running tests (requires Go 1.18+) |
| 43 | +ENABLE_LINT=true # Enable linting steps (golangci-lint) |
| 44 | +ENABLE_RACE_DETECTION=true # Enable Go's race detector in tests (-race flag) |
| 45 | +ENABLE_SECURITY_SCANS=true # Enable tools like gitleaks, govulncheck, nancy |
| 46 | +ENABLE_STATIC_ANALYSIS=true # Enable static analysis jobs (go vet) |
| 47 | +ENABLE_VERBOSE_TEST_OUTPUT=true # Enable verbose output for test runs (can slow down CI) |
| 48 | +MAKEFILE_REQUIRED=true # Enforce the presence of Makefile for builds (future feature) |
| 49 | + |
| 50 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 51 | +# ENV: Tool Versions & Config |
| 52 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 53 | +GITLEAKS_NOTIFY_USER_LIST=@mrz1836 # User(s) to notify when gitleaks secrets are found (user,user2) |
| 54 | +GITLEAKS_VERSION=8.27.2 # Version of gitleaks to install and use (X.Y.Z) |
| 55 | +GORELEASER_VERSION=v2.10.2 # Version of goreleaser to install and use (vX.Y.Z) |
| 56 | +GOVULNCHECK_VERSION=v1.1.4 # Version of govulncheck to use for Go vuln scanning (vX.Y.Z) |
| 57 | +NANCY_EXCLUDES=CVE-2024-38513,CVE-2022-21698,CVE-2023-45142 # Known acceptable CVEs (cve,cve2,...) |
| 58 | +NANCY_VERSION=v1.0.51 # Version of nancy to install and use (vX.Y.Z) |
| 59 | + |
| 60 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 61 | +# ENV: Stale Workflow Configuration |
| 62 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 63 | +STALE_DAYS_BEFORE_STALE=60 # Days of inactivity before marking as stale |
| 64 | +STALE_DAYS_BEFORE_CLOSE=14 # Additional days before closing stale items |
| 65 | +STALE_LABEL=stale # Label to apply to stale items |
| 66 | +STALE_EXEMPT_ISSUE_LABELS=work-in-progress,security,requires-manual-review # Issues with these labels won't go stale |
| 67 | +STALE_EXEMPT_PR_LABELS=work-in-progress,security,requires-manual-review # PRs with these labels won't go stale |
| 68 | +STALE_OPERATIONS_PER_RUN=300 # Maximum API operations per workflow run |
| 69 | + |
| 70 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 71 | +# ENV: Sync Labels Workflow Configuration |
| 72 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 73 | +SYNC_LABELS_FILE=.github/labels.yml # Path to the labels manifest file |
| 74 | + |
| 75 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 76 | +# ENV: Python Dependencies Workflow Configuration |
| 77 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 78 | +UPDATE_PYTHON_DEPENDENCIES_BRANCH=chore/update-python-dependencies # Branch name for python dependency update PRs |
| 79 | +PIP_DIRECTORY=.github/pip # Directory containing all pip requirement files |
| 80 | +UPDATE_PYTHON_DEPENDENCIES_SCHEDULE_UPDATE_MAIN=true # Default: Update main requirements on scheduled runs |
| 81 | +UPDATE_PYTHON_DEPENDENCIES_SCHEDULE_UPDATE_PIP_TOOLS=true # Default: Update pip-tools requirements on scheduled runs |
| 82 | +UPDATE_PYTHON_DEPENDENCIES_SCHEDULE_CREATE_PR=true # Default: Create PR on scheduled runs |
| 83 | +UPDATE_PYTHON_DEPENDENCIES_PR_LABELS=dependencies,chore,automated,python # Labels to apply to PRs (comma-separated) |
| 84 | +UPDATE_PYTHON_DEPENDENCIES_PR_ASSIGNEE=mrz1836 # Default assignee for PRs |
| 85 | + |
| 86 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 87 | +# ENV: Pre-commit Hooks Workflow Configuration |
| 88 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 89 | +UPDATE_PRE_COMMIT_HOOKS_BRANCH=chore/update-pre-commit-hooks # Branch name for pre-commit update PRs |
| 90 | +PRE_COMMIT_CONFIG_FILE=.pre-commit-config.yaml # Path to the pre-commit config file |
| 91 | +UPDATE_PRE_COMMIT_HOOKS_SCHEDULE_CREATE_PR=true # Default: Create PR on scheduled runs |
| 92 | +UPDATE_PRE_COMMIT_HOOKS_PR_LABELS=dependencies,chore,automated,pre-commit # Labels to apply to PRs (comma-separated) |
| 93 | +UPDATE_PRE_COMMIT_HOOKS_PR_ASSIGNEE=mrz1836 # Default assignee for PRs |
| 94 | +UPDATE_PRE_COMMIT_HOOKS_TEST_ON_UPDATE=true # Default: Test hooks after update |
| 95 | + |
| 96 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 97 | +# ENV: Dependabot Auto-merge Workflow Configuration |
| 98 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 99 | +DEPENDABOT_MAINTAINER_USERNAME=mrz1836 # Username to notify for manual reviews |
| 100 | +DEPENDABOT_AUTO_MERGE_PATCH=true # Auto-merge patch updates |
| 101 | +DEPENDABOT_AUTO_MERGE_MINOR_DEV=true # Auto-merge minor updates for dev dependencies |
| 102 | +DEPENDABOT_AUTO_MERGE_MINOR_PROD=false # Auto-merge minor updates for prod dependencies |
| 103 | +DEPENDABOT_AUTO_MERGE_SECURITY_NON_MAJOR=true # Auto-merge security updates (except major) |
| 104 | +DEPENDABOT_ALERT_ON_MAJOR=true # Alert maintainer on major updates |
| 105 | +DEPENDABOT_ALERT_ON_MINOR_PROD=true # Alert maintainer on minor prod updates |
| 106 | +DEPENDABOT_MANUAL_REVIEW_LABEL=requires-manual-review # Label for PRs requiring manual review |
| 107 | +DEPENDABOT_AUTO_MERGE_LABELS=automerge,dependabot # Labels for auto-merged PRs (comma-separated) |
| 108 | + |
| 109 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 110 | +# ENV: Auto-merge on Approval Workflow Configuration |
| 111 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 112 | +AUTO_MERGE_MIN_APPROVALS=1 # Minimum approvals required for auto-merge |
| 113 | +AUTO_MERGE_REQUIRE_ALL_REQUESTED_REVIEWS=true # Require all requested reviews to be completed |
| 114 | +AUTO_MERGE_ALLOWED_MERGE_TYPES=squash # Allowed merge types (squash,merge,rebase) comma-separated |
| 115 | +AUTO_MERGE_DELETE_BRANCH=true # Delete branch after merge |
| 116 | +AUTO_MERGE_SKIP_DRAFT=true # Skip draft PRs |
| 117 | +AUTO_MERGE_SKIP_WIP=true # Skip WIP PRs (title or label) |
| 118 | +AUTO_MERGE_WIP_LABELS=work-in-progress,wip,do-not-merge # Labels that indicate WIP (comma-separated) |
| 119 | +AUTO_MERGE_COMMENT_ON_ENABLE=true # Comment when auto-merge is enabled |
| 120 | +AUTO_MERGE_COMMENT_ON_DISABLE=true # Comment when auto-merge is disabled |
| 121 | +AUTO_MERGE_LABELS_TO_ADD=auto-merge-enabled # Labels to add when auto-merge is enabled |
| 122 | +AUTO_MERGE_SKIP_BOT_PRS=true # Skip bot PRs (they have separate workflows) |
| 123 | + |
| 124 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 125 | +# ENV: Pull Request Management Workflow Configuration |
| 126 | +# ─────────────────────────────────────────────────────────────────────────────── |
| 127 | +PR_MANAGEMENT_DEFAULT_ASSIGNEE=mrz1836 # Default assignee for PRs without one |
| 128 | +PR_MANAGEMENT_SKIP_BOT_USERS=dependabot[bot],mergify[bot],copilot[bot] # Bot users to skip (comma-separated) |
| 129 | +PR_MANAGEMENT_WELCOME_FIRST_TIME=true # Welcome first-time contributors |
| 130 | +PR_MANAGEMENT_APPLY_SIZE_LABELS=true # Apply size labels (XS, S, M, L, XL) |
| 131 | +PR_MANAGEMENT_APPLY_TYPE_LABELS=true # Apply type labels based on branch/title |
| 132 | +PR_MANAGEMENT_CLEAN_CACHE_ON_CLOSE=true # Clean runner cache when PR closes |
| 133 | +PR_MANAGEMENT_DELETE_BRANCH_ON_MERGE=true # Delete source branch after merge |
| 134 | +PR_MANAGEMENT_PROTECTED_BRANCHES=master,main,development # Branches that should never be deleted |
| 135 | +PR_MANAGEMENT_SIZE_XS_THRESHOLD=10 # Max changes for XS size label |
| 136 | +PR_MANAGEMENT_SIZE_S_THRESHOLD=50 # Max changes for S size label |
| 137 | +PR_MANAGEMENT_SIZE_M_THRESHOLD=200 # Max changes for M size label |
| 138 | +PR_MANAGEMENT_SIZE_L_THRESHOLD=500 # Max changes for L size label |
0 commit comments