From 504b082f364e35516b2727c11713c28b684b5af0 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/windows.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows/windows.yml') diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3a4de23245..82cca9353b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -40,9 +40,10 @@ 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' + shell: bash - name: Checkout a pull request run: | git clone --single-branch --shallow-since=yesterday --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src -- cgit v1.2.3