From e62aead26909e83f2c8b940186047f0a88b9f2d6 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Sat, 11 Jan 2020 16:24:16 +0900 Subject: Add branch option to checkout on push --- .github/workflows/ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows/ubuntu.yml') diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 66d7065d63..7a40c24acf 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -55,7 +55,7 @@ jobs: # Not using official actions/checkout because it's unstable and sometimes doesn't work for a fork. - name: Checkout ruby run: | - git clone --single-branch --shallow-since=yesterday https://github.com/${{ github.repository }} src + git clone --single-branch --shallow-since=yesterday --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src git -C src reset --hard "$GITHUB_SHA" if: github.event_name == 'push' - name: Checkout a pull request -- cgit v1.2.3