-
Notifications
You must be signed in to change notification settings - Fork 34
36 lines (36 loc) · 1.14 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
# This workflow caches crate dependencies, build tools, and external kits.
# The cache is only usable by workflows started from pull requests against the develop branch.
name: CacheDepsAndTools
on:
push:
branches: [develop]
paths:
- '.github/**'
- 'sources/Cargo.lock'
- 'sources/**/go.sum'
- 'Twoliter.toml'
- 'Twoliter.lock'
- 'Makefile'
jobs:
cache:
if: github.repository == 'bottlerocket-os/bottlerocket-core-kit'
runs-on:
group: bottlerocket
labels: bottlerocket_ubuntu-latest_8-core
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Preflight step to set up the runner
uses: ./.github/actions/setup-node
with:
perform-cache-cleanup: true
# This installs twoliter.
- run: make prep
# This fetches any external kit dependencies.
- run: make fetch
# This cleans the existing project local caches.
- run: make twoliter purge-cache
# This fetches Rust crate and Go module dependencies.
- run: make twoliter fetch
# This cleans the cargo cache in ~/.cargo
- run: cargo-cache