From dd032a5fb4dd8da59c685910b3c673439edc8c42 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Wed, 28 Aug 2019 00:13:54 +0900 Subject: [PATCH] Make doxygen / coverage torelant to clone race a little. Doing both `git clone --depth=1` and `git reset --hard ${sha}` does not make sense (the latter command either does nothing or just fails), so I added non-1 value as a depth. Maybe we don't need depth=50 for pull_request and schedule, so it's 10 for now. --- .github/workflows/coverage.yml | 4 ++-- .github/workflows/doxygen.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 404c60608f..dafc734ba3 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -19,12 +19,12 @@ jobs: # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork. - name: Checkout ruby/ruby - run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA" + run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA" env: GITHUB_SHA: ${{ github.sha }} if: github.event_name == 'schedule' - name: Checkout a pull request - run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV" + run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV" env: GITHUB_REV: ${{ github.event.pull_request.head.sha }} GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }} diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml index c6b15f8f61..73937a2097 100644 --- a/.github/workflows/doxygen.yml +++ b/.github/workflows/doxygen.yml @@ -19,12 +19,12 @@ jobs: # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork. - name: Checkout ruby/ruby - run: git clone --depth=1 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA" + run: git clone --depth=10 https://github.com/ruby/ruby . && git reset --hard "$GITHUB_SHA" env: GITHUB_SHA: ${{ github.sha }} if: github.event_name == 'schedule' - name: Checkout a pull request - run: git clone --depth=1 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV" + run: git clone --depth=10 "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" . && git reset --hard "$GITHUB_REV" env: GITHUB_REV: ${{ github.event.pull_request.head.sha }} GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }}