diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 93a6b334468..aa84ebbdbec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -270,8 +270,6 @@ jobs: with: submodules: true fetch-depth: 0 - - name: Show github context - run: echo '${{ toJSON(github) }}' - name: Run changed-files with defaults id: changed-files uses: ./ diff --git a/diff-sha.sh b/diff-sha.sh index 812c105bfa1..c07ae21dd57 100644 --- a/diff-sha.sh +++ b/diff-sha.sh @@ -70,8 +70,12 @@ if [[ -z $GITHUB_BASE_REF ]]; then fi if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then - INITIAL_COMMIT="true" - echo "::debug::Initial commit detected" + PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1") + + if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then + INITIAL_COMMIT="true" + echo "::debug::Initial commit detected" + fi fi else PREVIOUS_SHA=$INPUT_BASE_SHA