Refactor credential handling in sync workflow to ensure proper configuration before pushing to public repo

This commit is contained in:
b267a 2026-01-30 18:59:59 +01:00
parent 0df8c3583f
commit b70001b4b1

View file

@ -52,8 +52,10 @@ jobs:
git rm .github/workflows/sync-to-public.yml git rm .github/workflows/sync-to-public.yml
git commit -m "Remove sync workflow for public repo" git commit -m "Remove sync workflow for public repo"
# Explicitly set credentials for the public repo # Remove ALL existing credential helpers and use store
git config --global credential.https://github.com.helper '!f() { echo "username=x-access-token"; echo "password=${TOKEN}"; }; f' git config --global --unset-all credential.helper || true
git config --global credential.helper store
echo "https://x-access-token:${TOKEN}@github.com" > ~/.git-credentials
# Push to public repo # Push to public repo
git remote add public https://github.com/wiestju/anny-booking-automation.git git remote add public https://github.com/wiestju/anny-booking-automation.git