-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.13 KB
/
update_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
name: Cache Third Party Dependencies
# This is separate from the other build action in the hope that it can cache
# things on the main branch, which can thus be reused across multiple PRs. Per
# https://github.com/actions/cache/blob/v3/tips-and-workarounds.md#use-cache-across-feature-branches
# caches cannot be reused across feature branches, so we need a cache on the
# main branch instead.
on:
pull_request:
types:
- closed
permissions:
contents: read
jobs:
build_when_merged:
name: Build on ${{ matrix.os }}
if: github.event.pull_request.merged == true # Don't run unless we merged
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
steps:
- name: Cache third-party libraries
uses: actions/cache@v4
with:
key: ${{ matrix.os }}-
restore-keys: |
${{ matrix.os }}-
path: |
~/.stack
~/.local/bin
- name: Check out code
uses: actions/checkout@v4
- name: Build project
uses: freckle/stack-action@v5
with:
test: false