Skip to content

Commit 2ee374d

Browse files
committed
Signed-off-by: Günter Neiß <gneiss@web.de>
1 parent 80e5e2d commit 2ee374d

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/upstream-merge.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,45 +29,44 @@ jobs:
2929
DIFF_FILES=$(git diff --name-only $BASE upstream/main | grep -Ev '^(\.github/|\.git/|^[^/]+$)' || true)
3030
echo "DIFF_FILES: $DIFF_FILES"
3131
if [ -z "$DIFF_FILES" ]; then
32-
echo "no_relevant_changes=true" >> $GITHUB_OUTPUT
32+
echo "❎ Relevant files changed."
33+
echo "skip=false" >> $GITHUB_OUTPUT
3334
else
34-
echo "no_relevant_changes=false" >> $GITHUB_OUTPUT
35+
echo "❌ Only ignored files changed. Exiting."
36+
echo "skip=true" >> $GITHUB_OUTPUT
3537
fi
36-
- name: Exit if no relevant changes
37-
if: steps.check.outputs.no_relevant_changes == 'true'
38-
run: |
39-
echo "❎ Only ignored files changed. Exiting."
40-
exit 0
4138
- name: Merge upstream/main into local main
39+
if: steps.Check_Releases.outputs.skip == 'false'
4240
run: |
4341
git merge upstream/main --no-edit
4442
continue-on-error: true # erlaubt Fehler z. B. bei Konflikten
4543
- name: Check for merge conflicts
44+
if: steps.Check_Releases.outputs.skip == 'false'
4645
run: |
4746
if git ls-files -u | grep .; then
4847
echo "❌ Merge conflicts detected!"
4948
exit 1
5049
fi
5150
echo "✅ No merge conflicts"
5251
- name: Install GitHub CLI
52+
if: ${{ success() && steps.Check_Releases.outputs.skip == 'false' }}
5353
run: sudo apt-get install gh -y
5454
- name: Create branch, push and open PR
55-
if: ${{ success() }}
55+
if: ${{ success() && steps.Check_Releases.outputs.skip == 'false' }}
5656
env:
5757
GH_TOKEN: ${{ secrets.PAT }}
5858
run: |
5959
# 🟢 Option 1: Direkt pushen (Standard)
6060
#git push origin main
6161
6262
# 🟡 Option 2: PR statt direktem Merge (kommentieren, falls gewünscht)
63-
echo $GH_TOKEN | gh auth login --with-token
63+
#echo $GH_TOKEN | gh auth login --with-token
6464
BRANCH="upstream-merge-$(date +%s)"
6565
git checkout -b $BRANCH
6666
git push origin $BRANCH
6767
gh pr create --title "Merge from upstream" --body "Automatisch erstellter PR" --base main --head $BRANCH
68-
6968
- name: Trigger BuildLinux workflow
70-
if: ${{ false && success() }}
69+
if: ${{ false && success() && steps.Check_Releases.outputs.skip == 'false' }}
7170
uses: benc-uk/workflow-dispatch@v1
7271
with:
7372
workflow: LinuxBuild.yml

0 commit comments

Comments
 (0)