From 7bc85aaafae96b9aeed38d8e392322fb9ea31ad9 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Fri, 9 Dec 2022 10:23:58 +0530 Subject: Fix logic used to check if there were local changes in docker builds --- .github/workflows/docker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 0475d0a..0a51dc2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - + - name: Check whether there are any commits since this run was last triggered and push them and/or set the output id: should_run run: | @@ -33,9 +33,9 @@ jobs: git push origin main --no-verify git checkout - - git submodule update --init --recursive --remote --rebase --force + git rebase main - CHANGES_COUNT=$(git diff --shortstat origin/main | wc -l) + CHANGES_COUNT=$(git log @{u}.. | wc -l) MANUAL_REBUILD="${{ github.event_name == 'workflow_dispatch' }}" VERSION_BUMP="${{ contains(github.event.inputs.message, '[version bump]') }}" if [ $CHANGES_COUNT -gt 0 ] || [[ $MANUAL_REBUILD == "true" && $VERSION_BUMP == "true" ]]; then -- cgit v1.2.3-70-g09d2