forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.19 KB
/
cache.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Cache
on:
push:
paths:
- .github/workflows/cache.yml
schedule:
- cron: "0 */6 * * *" # every 6 hours
concurrency:
group: cache
cancel-in-progress: true
jobs:
update:
if: startsWith(github.repository, 'Homebrew/')
strategy:
matrix:
os:
- macos-11.0
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
test-bot: false
# Workaround until the `cache` action uses the changes from
# https://github.com/actions/toolkit/pull/580.
- name: Unlink workspace
run: |
rm "${GITHUB_WORKSPACE}"
mkdir "${GITHUB_WORKSPACE}"
- name: Cache Homebrew Gems
id: cache
uses: actions/[email protected]
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: Install Homebrew Gems
id: gems
run: brew install-bundler-gems
if: steps.cache.outputs.cache-hit != 'true'