From 139f0d90d98441ac54c6385acaf6d39eb61de63e Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 31 Dec 2019 09:34:29 -0800 Subject: Use actions/checkout for PR (#2804) --- .github/workflows/mingw.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 56f8c6bc46..f36af4bb29 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -42,14 +42,11 @@ jobs: git clone --single-branch --shallow-since=yesterday https://github.com/ruby/ruby src git -C src reset --hard "$GITHUB_SHA" if: github.event_name == 'push' + # It's hard to propagate `env` to this workflow's shell environment to checkout PR. Using unstable actions/checkout as a workaround. - name: Checkout a pull request - run: | - git clone --single-branch --shallow-since=yesterday "--branch=$GITHUB_BRANCH" "https://github.com/${GITHUB_REPO}" src - git -C src reset --hard "$GITHUB_REV" - env: - GITHUB_REV: ${{ github.event.pull_request.head.sha }} - GITHUB_BRANCH: ${{ github.event.pull_request.head.ref }} - GITHUB_REPO: ${{ github.event.pull_request.head.repo.full_name }} + uses: actions/checkout@v2 + with: + path: src if: github.event_name == 'pull_request' - run: ./src/tool/actions-commit-info.sh shell: bash -- cgit v1.2.3