|
| 1 | +# Adding repository secrets for CI |
| 2 | + |
| 3 | +Use repository secrets to store AWS credentials and cluster name for GitHub Actions. Do NOT commit any keys or kubeconfig files. |
| 4 | + |
| 5 | +Recommended secrets to add (names used by the workflow): |
| 6 | + |
| 7 | +- `AWS_ACCESS_KEY_ID` |
| 8 | +- `AWS_SECRET_ACCESS_KEY` |
| 9 | +- `AWS_REGION` |
| 10 | +- `EKS_CLUSTER_NAME` |
| 11 | + |
| 12 | +Add via GitHub UI: |
| 13 | + |
| 14 | +1. Go to your repository on GitHub. |
| 15 | +2. Settings → Secrets and variables → Actions → New repository secret. |
| 16 | +3. Add each secret with the names above. |
| 17 | + |
| 18 | +Add via GitHub CLI (`gh`) if you have it authenticated: |
| 19 | + |
| 20 | +```bash |
| 21 | +gh secret set AWS_ACCESS_KEY_ID -b "<your-access-key-id>" |
| 22 | +gh secret set AWS_SECRET_ACCESS_KEY -b "<your-secret-access-key>" |
| 23 | +gh secret set AWS_REGION -b "us-east-1" |
| 24 | +gh secret set EKS_CLUSTER_NAME -b "strellerminds-staging" |
| 25 | +``` |
| 26 | + |
| 27 | +Local testing (temporary environment variables): |
| 28 | + |
| 29 | +For Bash/WSL: |
| 30 | +```bash |
| 31 | +export AWS_ACCESS_KEY_ID="<your-access-key-id>" |
| 32 | +export AWS_SECRET_ACCESS_KEY="<your-secret-access-key>" |
| 33 | +export AWS_REGION="us-east-1" |
| 34 | +export EKS_CLUSTER_NAME="strellerminds-staging" |
| 35 | +``` |
| 36 | + |
| 37 | +For PowerShell (temporary for session): |
| 38 | +```powershell |
| 39 | +$env:AWS_ACCESS_KEY_ID="<your-access-key-id>" |
| 40 | +$env:AWS_SECRET_ACCESS_KEY="<your-secret-access-key>" |
| 41 | +$env:AWS_REGION="us-east-1" |
| 42 | +$env:EKS_CLUSTER_NAME="strellerminds-staging" |
| 43 | +``` |
| 44 | + |
| 45 | +After setting secrets or environment variables, the workflow can be triggered manually from Actions (select the `Blue-Green Deploy to EKS` workflow and click "Run workflow") or by pushing to `main`. |
| 46 | + |
| 47 | +PR link (branch pushed by me): |
| 48 | + |
| 49 | +https://github.com/oscarj007/StrellerMinds-SmartContracts/pull/new/add/blue-green-deploy-workflow |
0 commit comments