Skip to content

Commit 93dcc72

Browse files
committed
refactor: Use secrets for sync target, update bot identity, and streamline commit message in workflow.
1 parent 52e577b commit 93dcc72

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/sync.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
name: Sync org → personal repo (exclude .github)
1+
name: Sync repository
22

33
# Trigger on every push (all branches)
44
on:
55
push:
66
branches:
7-
- '**'
7+
- "**"
88

99
env:
10-
TARGET_OWNER: parthsali
11-
TARGET_REPO: learnverse-web
12-
# Set MIRROR_ALL: 'true' if you want to mirror all refs & tags (destructive)
13-
MIRROR_ALL: 'false'
10+
TARGET_OWNER: ${{ secrets.TARGET_OWNER }}
11+
TARGET_REPO: ${{ secrets.TARGET_REPO }}
12+
MIRROR_ALL: "false"
1413

1514
permissions:
1615
contents: read
@@ -61,8 +60,8 @@ jobs:
6160
6261
- name: Configure git
6362
run: |
64-
git config user.name "github-actions[bot]"
65-
git config user.email "github-actions[bot]@users.noreply.github.com"
63+
git config user.name "Learnverse Bot"
64+
git config user.email "learnverse-bot@users.noreply.github.com"
6665
6766
- name: Push branch to personal repo (excluding .github)
6867
env:
@@ -83,7 +82,7 @@ jobs:
8382
if git diff --cached --quiet; then
8483
echo "No .github files to remove from index; still pushing HEAD (no change)."
8584
else
86-
git commit -m "Exclude .github directory from sync"
85+
git commit --amend --no-edit
8786
fi
8887
8988
# Force-push the sanitized branch to the target branch on personal repo

0 commit comments

Comments
 (0)