[前][次][番号順一覧][スレッド一覧]

ruby-changes:59581

From: Takashi <ko1@a...>
Date: Wed, 1 Jan 2020 02:34:46 +0900 (JST)
Subject: [ruby-changes:59581] 139f0d90d9 (master): Use actions/checkout for PR (#2804)

https://git.ruby-lang.org/ruby.git/commit/?id=139f0d90d9

From 139f0d90d98441ac54c6385acaf6d39eb61de63e Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Tue, 31 Dec 2019 09:34:29 -0800
Subject: Use actions/checkout for PR (#2804)


diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index 56f8c6b..f36af4b 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -42,14 +42,11 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L42
           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 v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]