diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6b680f..4532099 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,8 +23,14 @@ jobs: run: | CHANGED=0 git fetch origin main - if git diff --name-only HEAD^ HEAD | grep -q "^\.docker/"; then - CHANGED=1 + if [ "$(git rev-list --count HEAD)" -gt 1 ]; then + # Ensure that there is more than 1 commit in the history + if git diff --name-only HEAD^ HEAD | grep -q "^\.docker/"; then + CHANGED=1 + fi + else + # If there's no previous commit, assume no changes + CHANGED=0 fi echo "changed=${CHANGED}" >> $GITHUB_OUTPUT