Skip to content

Commit 6dec095

Browse files
authored
ci: Avoid failure in fledge workflow if no changes (#44)
1 parent 560ab66 commit 6dec095

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/fledge.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,14 @@ jobs:
104104
env:
105105
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106106
run: |
107-
set -x
108-
gh pr create --base main --head fledge --fill-first
109-
gh workflow run rcc -f ref=$(git rev-parse HEAD)
110-
gh pr merge --squash --auto
107+
set -ex
108+
if [ -n "$(git diff main --numstat)" ]; then
109+
gh pr create --base main --head fledge --fill-first
110+
gh workflow run rcc -f ref=$(git rev-parse HEAD)
111+
gh pr merge --squash --auto
112+
else
113+
echo "No changes."
114+
fi
111115
shell: bash
112116

113117
- name: Check release

0 commit comments

Comments
 (0)