-
Notifications
You must be signed in to change notification settings - Fork 0
SECRETS
github-actions[bot] edited this page Feb 21, 2026
·
1 revision
This document explains how to configure all required secrets for the CI/CD pipeline in GitHub Actions.
- Go to your GitHub repository:
https://github.com/epitech-nice/epicalendar - Click Settings → Secrets and variables → Actions
- Click New repository secret for each of the following
-
Name:
NEXT_PUBLIC_API_URL -
Value: Your production API URL (e.g.,
https://api.yourdomain.comorhttp://your-server-ip:5000) - Used for: Building the Next.js client with the correct API endpoint
-
Name:
KUBECONFIG - Value: Base64-encoded Kubernetes config file
- Used for: Authenticating with your Kubernetes cluster
-
How to get it:
Copy the entire base64 output
cat ~/.kube/config | base64
-
Name:
MONGO_ROOT_USERNAME -
Value: MongoDB root username (e.g.,
admin) - Used for: MongoDB authentication in Kubernetes
-
Name:
MONGO_ROOT_PASSWORD - Value: Strong password for MongoDB root user
- Used for: MongoDB authentication in Kubernetes
-
Example: Generate a strong password like
$(openssl rand -base64 32)
-
Name:
JWT_SECRET - Value: Secret key for JWT token signing
- Used for: Authentication token generation/validation
-
Example: Generate a strong secret like
$(openssl rand -base64 64)
- Already provided by GitHub Actions automatically
-
Used for:
- Authenticating to GitHub Container Registry (ghcr.io) to push images
- Creating Kubernetes imagePullSecret to pull private images from ghcr.io
- No action required
Generate secure values for secrets:
# Generate JWT_SECRET
openssl rand -base64 64
# Generate MONGO_ROOT_PASSWORD
openssl rand -base64 32
# Get base64-encoded kubeconfig
cat ~/.kube/config | base64-
NEXT_PUBLIC_API_URL- Your production API URL -
KUBECONFIG- Base64-encoded Kubernetes config -
MONGO_ROOT_USERNAME- MongoDB admin username -
MONGO_ROOT_PASSWORD- MongoDB admin password -
JWT_SECRET- JWT signing secret
Once all secrets are configured, your pipeline will automatically:
- Build Docker images for server and client
- Push images to GitHub Container Registry (ghcr.io)
- Deploy to your Kubernetes cluster on every push to the
mainbranch
You can verify the secrets are properly set by:
- Going to Settings → Secrets and variables → Actions
- Checking that all 5 required secrets are listed
- Running the pipeline and checking for authentication errors