From 04deab1291732697d614a8cb17918c55fc469a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 8 Dec 2024 08:04:34 +0100 Subject: [PATCH] ci: Avoid failure in fledge workflow if no changes (#851) --- .github/workflows/fledge.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fledge.yaml b/.github/workflows/fledge.yaml index c87b8477..4b1340ae 100644 --- a/.github/workflows/fledge.yaml +++ b/.github/workflows/fledge.yaml @@ -94,10 +94,14 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - set -x - gh pr create --base main --head fledge --fill-first - gh workflow run rcc -f ref=$(git rev-parse HEAD) - gh pr merge --squash --auto + set -ex + if [ -n "$(git diff main --numstat)" ]; then + gh pr create --base main --head fledge --fill-first + gh workflow run rcc -f ref=$(git rev-parse HEAD) + gh pr merge --squash --auto + else + echo "No changes." + fi shell: bash - name: Check release