Skip to content

Commit 4cc846e

Browse files
committed
FIX: Address PR comments
Add extra check for git commit no changes. Signed-off-by: Jim Fitzpatrick <jfitzpat@redhat.com>
1 parent 553411d commit 4cc846e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/sector-release.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ jobs:
4141
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
4242
git config --global user.name "${{ github.actor}}"
4343
44-
git commit . -s -m "Prepare release ${{ github.event.inputs.version }}"
44+
if git diff --quiet && git diff --cached --quiet; then
45+
echo "No changes to commit; pushing branch as-is."
46+
else
47+
git commit . -s -m "Prepare release ${{ github.event.inputs.version }}"
48+
fi
4549
git push --set-upstream origin "${{ steps.prepare-branch.outputs.branch-name }}"
4650
4751
release:

0 commit comments

Comments
 (0)