Skip to content
Closed

Develop #3732

Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: add deployment secret contract validation
  • Loading branch information
master-kanor committed Aug 22, 2026
commit eee347819266ce0e73108ff001ac7c7fcfe1170a
45 changes: 45 additions & 0 deletions .github/workflows/secret-contract.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deployment Secret Contract

on:
workflow_dispatch:
push:
branches: [staging, main]
paths:
- '.github/workflows/secret-contract.yml'
- 'docs/BRANCHING_AND_SECRETS.md'

permissions:
contents: read

jobs:
validate-contract:
runs-on: ubuntu-latest
environment: ${{ github.ref_name == 'main' && 'production' || 'staging' }}
env:
SUPABASE_PROJECT_REF: ${{ secrets.SUPABASE_PROJECT_REF }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_SECRET_KEY: ${{ secrets.SUPABASE_SECRET_KEY }}
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
steps:
- name: Validate required deployment secrets exist
shell: bash
run: |
set -euo pipefail
missing=0
for name in SUPABASE_PROJECT_REF SUPABASE_URL SUPABASE_SECRET_KEY TELEGRAM_API_ID TELEGRAM_API_HASH; do
if [ -z "${!name:-}" ]; then
echo "Missing required secret: $name"
missing=1
fi
done
exit "$missing"
- name: Confirm safe defaults
env:
EXTERNAL_SEND_ENABLED: ${{ vars.EXTERNAL_SEND_ENABLED }}
shell: bash
run: |
if [ "${EXTERNAL_SEND_ENABLED:-false}" != "false" ]; then
echo 'External Telegram sending must remain disabled until approval controls are validated.'
exit 1
fi