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

ruby-changes:60050

From: Takashi <ko1@a...>
Date: Thu, 13 Feb 2020 15:23:24 +0900 (JST)
Subject: [ruby-changes:60050] a24d2f3b8c (ruby_2_7): Use actions/checkout for PR (#2804)

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

From a24d2f3b8cf98d067f6648a0609b6251d3e0a464 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/

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