diff --git a/.github/workflows/post-commit.yml b/.github/workflows/post-commit.yml index bac27e467182..d6a4eb0a5df6 100644 --- a/.github/workflows/post-commit.yml +++ b/.github/workflows/post-commit.yml @@ -134,9 +134,13 @@ jobs: - name: checkout to /mnt/ozone run: | sudo chmod 777 /mnt - git clone https://github.com/${GITHUB_REPOSITORY}.git /mnt/ozone + git clone 'https://github.com/${{ github.repository }}.git' /mnt/ozone cd /mnt/ozone - git fetch origin "${GITHUB_REF}" + if [[ '${{ github.event_name }}' == 'pull_request' ]]; then + git fetch --verbose origin '${{ github.ref }}' + else + git fetch --verbose origin '${{ github.sha }}' + fi git checkout FETCH_HEAD git reset --hard - name: run a full build