From 2cf5a58adfb14a64ca41a10dae97e22f932794cd Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 17 Sep 2020 13:54:12 +0800 Subject: [PATCH] Install `yq` by APT on ubuntu of gh-actions. `brew intall` on Ubuntu is too slow (about 1 min) --- .github/workflows/ci.yml | 17 +++++++++++------ .github/workflows/pages-deploy.yml.hook | 11 +++++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1acb42..c20a8bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,18 @@ jobs: with: ruby-version: '2.6.x' - - name: install tooling + - name: Install tools (for Ubuntu) + if: matrix.os == 'ubuntu-latest' run: | + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 + sudo add-apt-repository ppa:rmescandon/yq + sudo apt update + sudo apt install yq -y + + - name: Install tools (for macOS) + if: matrix.os == 'macos-latest' + run: | + brew install coreutils brew install yq - name: Checkout @@ -47,11 +57,6 @@ jobs: restore-keys: | ${{ runner.os }}-gems- - - name: Install GNU-Coreutils(for macOS) - if: runner.os == 'macOS' - run: | - brew install coreutils - - name: Bundle config run: | bundle config path vendor/bundle diff --git a/.github/workflows/pages-deploy.yml.hook b/.github/workflows/pages-deploy.yml.hook index 45595d4..cbbcec2 100644 --- a/.github/workflows/pages-deploy.yml.hook +++ b/.github/workflows/pages-deploy.yml.hook @@ -17,15 +17,18 @@ jobs: with: ruby-version: '2.6.x' + - name: Install tools + run: | + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64 + sudo add-apt-repository ppa:rmescandon/yq + sudo apt update + sudo apt install yq -y + - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Install yq - run: | - brew install yq - - name: Bundle Caching id: bundle-cache uses: actions/cache@v1