Skip to content

Update README.md

Update README.md #7

Workflow file for this run

name: Sync
on:
push:
branches:
- main
- dev
jobs:
sync:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Disable Git Credential Helper
run: |
git config --global --unset credential.helper || echo "No credential helper set"
- name: Checkout source repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # Tüm geçmişi al
token: ${{ secrets.TEST_TOKEN }}
- name: Fetch Latest Main
run: git fetch origin main
- name: Configure Git User (Local)
run: |
git config --local user.name "${{ secrets.TEST_USERNAME }}"
git config --local user.email "${{ secrets.TEST_EMAIL }}"
- name: Check Git Config
run: |
git config --list --show-origin || echo "No config found"
git remote -v
- name: Debug Git Branches
run: git branch -a
- name: Add Remote with PAT
run: |
git remote remove destination || echo "No existing remote"
git remote add destination https://${{ secrets.TEST_USERNAME }}:${{ secrets.TEST_TOKEN }}@github.com/${{ secrets.TEST_DEST_REPO }}
git remote -v
- name: Push main to destination repo
run: |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: $CURRENT_BRANCH"
git push --force destination $CURRENT_BRANCH