diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 2008365..ba2480d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -22,7 +22,10 @@ jobs: - name: Configure kubectl run: | mkdir -p ~/.kube - echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > ~/.kube/config + echo "${{ secrets.KUBE_CONFIG }}" | base64 -d > ~/.kube/config || { + echo "Base64 decode failed, trying direct copy..." + echo "${{ secrets.KUBE_CONFIG }}" > ~/.kube/config + } chmod 600 ~/.kube/config - name: Verify cluster connection diff --git a/GITEA-SETUP.md b/GITEA-SETUP.md index d09c172..962b475 100644 --- a/GITEA-SETUP.md +++ b/GITEA-SETUP.md @@ -22,15 +22,24 @@ Go to your repository → **Settings** → **Secrets** Add the following secret: #### `KUBE_CONFIG` -Your base64-encoded kubeconfig file: +Your kubeconfig file content. You have two options: +**Option 1: Base64 encoded (recommended)** ```bash -# Get your kubeconfig in base64 format +# Get your kubeconfig in base64 format (single line) cat ~/.kube/config | base64 -w 0 ``` +**Option 2: Raw kubeconfig content** +```bash +# If base64 fails, use raw content +cat ~/.kube/config +``` + Copy the output and paste it as the value for `KUBE_CONFIG` secret. +> **Note**: The workflow automatically handles both base64-encoded and raw kubeconfig formats. + ### 3. Configure Environment (Optional but Recommended) Go to repository → **Settings** → **Environments**