diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-12-31 09:34:29 -0800 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-01-30 13:34:25 +0900 |
commit | a24d2f3b8cf98d067f6648a0609b6251d3e0a464 (patch) | |
tree | 3270b8f72531b011dc45fed0e7d9dad2afb2df21 /.github | |
parent | 77dfa520d476143b8be6c4805354838012b4d335 (diff) |
Use actions/checkout for PR (#2804)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/mingw.yml | 11 |
1 files changed, 4 insertions, 7 deletions
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 |