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

ruby-changes:61212

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Tue, 12 May 2020 17:15:48 +0900 (JST)
Subject: [ruby-changes:61212] b16acf8baa (master): .github: use actions/checkout@v2 again

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

From b16acf8baa4899dc4e39246dcb89b351e4adfa13 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?=
 <shyouhei@r...>
Date: Mon, 11 May 2020 18:37:08 +0900
Subject: .github: use actions/checkout@v2 again


diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
index 5765c05..b16e0c2 100644
--- a/.github/workflows/macos.yml
+++ b/.github/workflows/macos.yml
@@ -13,17 +13,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/macos.yml#L13
         run: |
           sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate off
           sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
-      # 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 --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src
-          git -C src reset --hard "$GITHUB_SHA"
-        if: github.event_name == 'push'
-      - name: Checkout a pull request
-        run: |
-          git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
-          git -C src reset --hard ${{ github.event.pull_request.head.sha }}
-        if: github.event_name == 'pull_request'
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 128
+          path: src
       - run: ./src/tool/actions-commit-info.sh
         id: commit_info
       - name: Install libraries
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index a3cbf8a..b522386 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -27,19 +27,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L27
         run: |
           git config --system core.autocrlf false
           git config --system core.eol lf
-      # Not using official actions/checkout@v2 because it's unstable.
-      - name: Checkout ruby
-        run: |
-          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 --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
-          git -C src reset --hard ${{ github.event.pull_request.head.sha }}
-        if: github.event_name == 'pull_request'
-        shell: bash
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 128
+          path: src
       - run: ./src/tool/actions-commit-info.sh
         shell: bash
         id: commit_info
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index fbeed8d..c07d7e6 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -18,17 +18,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mjit.yml#L18
           set -x
           sudo apt-get update -q || :
           sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
-      # 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 --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src
-          git -C src reset --hard "$GITHUB_SHA"
-        if: github.event_name == 'push'
-      - name: Checkout a pull request
-        run: |
-          git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
-          git -C src reset --hard ${{ github.event.pull_request.head.sha }}
-        if: github.event_name == 'pull_request'
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 128
+          path: src
       - run: ./src/tool/actions-commit-info.sh
         id: commit_info
       - name: Fixed world writable dirs
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 27ce6ae..0935277 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -24,17 +24,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L24
           set -x
           sudo apt-get update -q || :
           sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev bison autoconf ruby
-      # 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 --branch=${GITHUB_REF#refs/heads/} https://github.com/${{ github.repository }} src
-          git -C src reset --hard "$GITHUB_SHA"
-        if: github.event_name == 'push'
-      - name: Checkout a pull request
-        run: |
-          git clone --single-branch --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
-          git -C src reset --hard ${{ github.event.pull_request.head.sha }}
-        if: github.event_name == 'pull_request'
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 128
+          path: src
       - run: ./src/tool/actions-commit-info.sh
         id: commit_info
       - name: Fixed world writable dirs
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 5048b46..05bea72 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -31,18 +31,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L31
       - name: Install libraries with chocolatey
         run: |
           choco install --no-progress openssl winflexbison3
-      # 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 --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 --depth=50 --branch=${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }} src
-          git -C src reset --hard ${{ github.event.pull_request.head.sha }}
-        if: github.event_name == 'pull_request'
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 128
+          path: src
       - run: ./src/tool/actions-commit-info.sh
         shell: bash
         id: commit_info
-- 
cgit v0.10.2


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

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