Fix the bundle cache path for CD hook.

This commit is contained in:
Cotes Chung 2020-10-03 16:45:17 +08:00
parent 04ad7bf432
commit 67d962d707

View file

@ -4,18 +4,21 @@ on:
branches: branches:
- master - master
paths-ignore: paths-ignore:
- '.gitignore' - .gitignore
- 'README.md' - README.md
- 'LICENSE' - LICENSE
jobs: jobs:
continuous-delivery: continuous-delivery:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
GEMS_PATH: /tmp/bundle
steps: steps:
- uses: actions/setup-ruby@v1 - uses: actions/setup-ruby@v1
with: with:
ruby-version: '2.6.x' ruby-version: 2.6.x
- name: Install tools - name: Install tools
run: | run: |
@ -33,14 +36,14 @@ jobs:
id: bundle-cache id: bundle-cache
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: vendor/bundle path: ${{ env.GEMS_PATH }}
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }} key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: | restore-keys: |
${{ runner.os }}-gems- ${{ runner.os }}-gems-
- name: Bundle config - name: Bundle config
run: | run: |
bundle config path vendor/bundle bundle config path ${{ env.GEMS_PATH }}
- name: Bundle Install - name: Bundle Install
if: steps.bundle-cache.outputs.cache-hit != 'true' if: steps.bundle-cache.outputs.cache-hit != 'true'