From 073e10891a1ca257102110a023be94702bb8f7a4 Mon Sep 17 00:00:00 2001 From: nutcas3 Date: Tue, 21 Apr 2026 11:05:55 +0300 Subject: [PATCH] feat: Add staging environment configuration with protection rules, approvals, and environment variables - Add staging.yml with environment name/URL and protection rules configuration - Add required_reviewers (staging-team-lead/devops-engineer) and prevent_force_pushes setting - Add required_status_checks with strict mode for build-and-push/test-suite contexts - Add environment_variables for API_BASE_URL/DATABASE_URL/REDIS_URL/LOG_LEVEL/ENVIRONMENT - Add secrets references for STAGING_DB_PASSWORD/ --- .github/environments/staging.yml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/environments/staging.yml diff --git a/.github/environments/staging.yml b/.github/environments/staging.yml new file mode 100644 index 0000000..58a1ebd --- /dev/null +++ b/.github/environments/staging.yml @@ -0,0 +1,36 @@ +# Staging Environment Configuration +name: staging +url: https://staging.telecom-platform.com + +# Environment protection rules +protection_rules: + # Require approval from staging team + required_reviewers: + - staging-team-lead + - devops-engineer + + # Prevent force pushes + prevent_force_pushes: true + + # Require status checks + required_status_checks: + strict: true + contexts: + - build-and-push + - test-suite + +# Environment variables +environment_variables: + API_BASE_URL: https://api.staging.telecom-platform.com + DATABASE_URL: postgresql://staging-user:staging-pass@staging-db.internal:5432/telecom_staging + REDIS_URL: redis://staging-redis.internal:6379 + LOG_LEVEL: info + ENVIRONMENT: staging + +# Secrets (configured in GitHub repository settings) +# These are referenced but not stored in the file +secrets: + - STAGING_DB_PASSWORD + - STAGING_API_KEY + - STAGING_JWT_SECRET + - KUBECONFIG_STAGING