From 8f912be95e6e5c585504ffbe4b633bd2de072d3c Mon Sep 17 00:00:00 2001 From: openshift-pipelines-bot Date: Fri, 13 Dec 2024 12:39:46 +0000 Subject: [PATCH] [bot] update konflux configuration --- .github/workflows/update-sources.main.yaml | 14 ++++++++++++-- .github/workflows/update-sources.next.yaml | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update-sources.main.yaml b/.github/workflows/update-sources.main.yaml index d99e0f69af..724963b09a 100644 --- a/.github/workflows/update-sources.main.yaml +++ b/.github/workflows/update-sources.main.yaml @@ -35,14 +35,24 @@ jobs: sed -i "s%go 1.22.*%go 1.22%g" go.mod sed -i "s%go 1.22.*%go 1.22%g" vendor/modules.txt - git diff > ../.konflux/patches/0000-go1.22.patch + if [[ -z $(git status --porcelain --untracked-files=no) ]]; then + echo "No change, exiting" + exit 0 + else + git diff > ../.konflux/patches/0000-go1.22.patch + fi # clean after yourself >:D git checkout HEAD go.mod vendor/modules.txt sed -i "s%go 1.23.*%go 1.22%g" go.mod sed -i "s%go 1.23.*%go 1.22%g" vendor/modules.txt - git diff > ../.konflux/patches/0000-go1.23.patch + if [[ -z $(git status --porcelain --untracked-files=no) ]]; then + echo "No change, exiting" + exit 0 + else + git diff > ../.konflux/patches/0000-go1.23.patch + fi # clean after yourself >:D git checkout HEAD go.mod vendor/modules.txt diff --git a/.github/workflows/update-sources.next.yaml b/.github/workflows/update-sources.next.yaml index 831499a080..23fc780228 100644 --- a/.github/workflows/update-sources.next.yaml +++ b/.github/workflows/update-sources.next.yaml @@ -35,14 +35,24 @@ jobs: sed -i "s%go 1.22.*%go 1.22%g" go.mod sed -i "s%go 1.22.*%go 1.22%g" vendor/modules.txt - git diff > ../.konflux/patches/0000-go1.22.patch + if [[ -z $(git status --porcelain --untracked-files=no) ]]; then + echo "No change, exiting" + exit 0 + else + git diff > ../.konflux/patches/0000-go1.22.patch + fi # clean after yourself >:D git checkout HEAD go.mod vendor/modules.txt sed -i "s%go 1.23.*%go 1.22%g" go.mod sed -i "s%go 1.23.*%go 1.22%g" vendor/modules.txt - git diff > ../.konflux/patches/0000-go1.23.patch + if [[ -z $(git status --porcelain --untracked-files=no) ]]; then + echo "No change, exiting" + exit 0 + else + git diff > ../.konflux/patches/0000-go1.23.patch + fi # clean after yourself >:D git checkout HEAD go.mod vendor/modules.txt