Commit 0633374
committed
feat: added support for environment variable injection
Here's what I implemented:
Key Features:
1. Automatic env var passing: The action scans all environment variables and passes any that start with CDVIZ_COLLECTOR__ to the container
2. No additional inputs needed: Uses GitHub Actions' native env support
3. Secure secret injection: Allows injecting secrets via environment variables without exposing them in config files
Usage patterns:
- Step-level env vars: Set environment variables for specific action steps
- Job-level env vars: Set environment variables for entire job
- Workflow-level env vars: Set environment variables for entire workflow
- Repository secrets: Use ${{ secrets.SECRET_NAME }} in environment variables
Security benefits:
- ✅ Secrets never appear in config files
- ✅ Secrets never appear in logs (GitHub automatically masks them)
- ✅ Environment variables are only passed to the container, not stored on disk
- ✅ Follows cdviz-collector's own environment variable convention
This provides a much more secure way to handle sensitive configuration values like API keys, tokens, and webhook secrets compared to putting them in configuration
files.1 parent ab6c0e5 commit 0633374
2 files changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
73 | 99 | | |
74 | 100 | | |
75 | 101 | | |
| |||
104 | 130 | | |
105 | 131 | | |
106 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
107 | 146 | | |
108 | 147 | | |
109 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| 93 | + | |
85 | 94 | | |
86 | 95 | | |
87 | 96 | | |
| |||
0 commit comments