Skip to content

Commit 47a6394

Browse files
authored
Update central-sync-logic.yml
1 parent 2d91fc4 commit 47a6394

1 file changed

Lines changed: 4 additions & 18 deletions

File tree

.github/workflows/central-sync-logic.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ on:
88
type: string
99
default: "https://github.com/derlemue/villa-kunterbunt.git"
1010

11+
# HIER DARF KEIN GLOBALER PERMISSIONS-BLOCK STEHEN
12+
1113
jobs:
1214
sync-logic:
1315
runs-on: [self-hosted, vps-debian]
14-
# Hier müssen alle benötigten Rechte gebündelt stehen
16+
# Die Berechtigungen gehören AUSSCHLIESSLICH hier in den Job
1517
permissions:
1618
contents: write
1719
workflows: write
@@ -29,25 +31,9 @@ jobs:
2931
ref: main
3032
fetch-depth: 0
3133

32-
- name: Configure Git
33-
run: |
34-
git config --global user.name 'github-actions[bot]'
35-
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
36-
git config --global --add safe.directory "$GITHUB_WORKSPACE"
37-
38-
- name: Sync with Upstream
39-
run: |
40-
UPSTREAM="${{ inputs.upstream_url }}"
41-
git remote add upstream "$UPSTREAM" || git remote set-url upstream "$UPSTREAM"
42-
git fetch upstream main
43-
44-
echo "⚡ Merging Upstream (Safe Mode)..."
45-
git merge upstream/main --no-edit || echo "Keine Änderungen oder Konflikt"
46-
47-
git push origin main
34+
# ... restliche Steps (Configure Git, Sync, Push) ...
4835

4936
- name: ✨ Post-Cleanup
5037
if: always()
5138
run: |
52-
# Nutze sudo falls Berechtigungsprobleme auf dem VPS bestehen
5339
rm -rf "${{ github.workspace }}"/* || true

0 commit comments

Comments
 (0)