Skip to content

Commit 347b939

Browse files
authored
Update central-sync-logic.yml
1 parent 47a6394 commit 347b939

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,30 @@ on:
66
upstream_url:
77
required: true
88
type: string
9-
default: "https://github.com/derlemue/villa-kunterbunt.git"
10-
11-
# HIER DARF KEIN GLOBALER PERMISSIONS-BLOCK STEHEN
129

1310
jobs:
1411
sync-logic:
1512
runs-on: [self-hosted, vps-debian]
16-
# Die Berechtigungen gehören AUSSCHLIESSLICH hier in den Job
17-
permissions:
18-
contents: write
19-
workflows: write
2013
if: github.repository != 'lemueIO/.github' && github.repository != 'derlemue/villa-kunterbunt'
21-
2214
steps:
2315
- name: 🧹 Pre-Cleanup
24-
run: |
25-
rm -rf ./* || true
26-
rm -rf ./.git || true
16+
run: rm -rf ./* ./.git || true
2717

2818
- name: Checkout
2919
uses: actions/checkout@v4
3020
with:
3121
ref: main
3222
fetch-depth: 0
3323

34-
# ... restliche Steps (Configure Git, Sync, Push) ...
24+
- name: Configure Git
25+
run: |
26+
git config --global user.name 'github-actions[bot]'
27+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
28+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
3529
36-
- name: ✨ Post-Cleanup
37-
if: always()
30+
- name: Sync with Upstream
3831
run: |
39-
rm -rf "${{ github.workspace }}"/* || true
32+
git remote add upstream "${{ inputs.upstream_url }}" || true
33+
git fetch upstream main
34+
git merge upstream/main --no-edit || echo "Kein Merge nötig"
35+
git push origin main

0 commit comments

Comments
 (0)