From 6c8e7812eef9c780577910863cd01999e5abe649 Mon Sep 17 00:00:00 2001 From: "Sovereign Sentinel (AI)" Date: Sat, 11 Apr 2026 22:21:49 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Sentinel:=20Implementing=20Auth?= =?UTF-8?q?=20Health=20Check=20and=20Fail-Stop=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/sync-to-main-app.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-to-main-app.yml b/.github/workflows/sync-to-main-app.yml index efbcb65..57fb052 100644 --- a/.github/workflows/sync-to-main-app.yml +++ b/.github/workflows/sync-to-main-app.yml @@ -23,7 +23,23 @@ jobs: - name: 📥 Manual Checkout thealtstack (target) run: | - git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/aa-humaaan/thealtstack.git target-repo + echo "🔍 Sentinel: Running Auth Health Check..." + if [ -z "${{ secrets.GH_PAT }}" ]; then + echo "❌ ERROR: GH_PAT secret is missing in this repository!" + exit 1 + fi + + # Try to clone with error trapping + if ! git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/aa-humaaan/thealtstack.git target-repo; then + echo "--------------------------------------------------------------------------------" + echo "❌ CRITICAL: AUTHENTICATION FAILURE (403/401)" + echo "Aditya, the 'GH_PAT' secret in this repository is invalid or lacks permissions." + echo "FIX: Refresh your Personal Access Token with 'repo' scope and update it in:" + echo "https://github.com/altstackHQ/altstack-data/settings/secrets/actions" + echo "--------------------------------------------------------------------------------" + exit 1 + fi + cd target-repo git checkout main