From d0d7daf96577952ba0a9686d8c13221c6f6716aa Mon Sep 17 00:00:00 2001 From: Artyom Jaksov Date: Wed, 2 Oct 2024 15:31:37 +0200 Subject: [PATCH] try with fetch depth --- .github/workflows/check-version.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-version.yml b/.github/workflows/check-version.yml index 87893ad..c051030 100644 --- a/.github/workflows/check-version.yml +++ b/.github/workflows/check-version.yml @@ -9,14 +9,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + with: + fetch-depth: 0 - name: Set OLD_VERSION from etc/config.xml if merge would modify it run: | - echo "OLD_VERSION=$(git log main..HEAD --cherry -p -- etc/config.xml | grep '\-.\s*.\' | tr -d '\-[:blank:]\n' | sed -e 's/\(.*\)<\/version>/\1/')" >> $GITHUB_ENV + echo "OLD_VERSION=$(git log main.. --cherry -p -- etc/config.xml | grep '\-.\s*.\' | tr -d '\-[:blank:]\n' | sed -e 's/\(.*\)<\/version>/\1/')" >> $GITHUB_ENV - name: Set NEW_VERSION from etc/config.xml if merge would modify it run: | - echo "NEW_VERSION=$(git log main..HEAD --cherry -p -- etc/config.xml | grep '\+.\s*.\' | tr -d '+[:blank:]\n' | sed -e 's/\(.*\)<\/version>/\1/')" >> $GITHUB_ENV + echo "NEW_VERSION=$(git log main.. --cherry -p -- etc/config.xml | grep '\+.\s*.\' | tr -d '+[:blank:]\n' | sed -e 's/\(.*\)<\/version>/\1/')" >> $GITHUB_ENV - name: Test that versions are not empty run: |