generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (51 loc) · 1.46 KB
/
writecache.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
49
50
51
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-writecache
cancel-in-progress: true
name: Write Cache
jobs:
write-cache:
name: Write Cache
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Init Hermit
uses: cashapp/activate-hermit@v1
- name: Docker Compose
run: docker compose up -d --wait
- name: Init DB
run: just init-db
- name: Rebuild All
run: just build-all
- name: Download Go Dependencies
run: go mod download -x
- name: Download pnpm dependencies
run: pnpm install
- id: find-go-build-cache
shell: bash
run: echo "cache=$(go env GOCACHE)" >> "$GITHUB_OUTPUT"
- name: Save Go Module Cache
uses: actions/cache/save@v4
with:
path: |
~/go/pkg/mod
${{ steps.find-go-build-cache.outputs.cache }}
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- name: Save Maven Modules Cache
id: cache-maven
uses: actions/cache/save@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Save pnpm Modules Cache
id: cache-pnpm
uses: actions/cache/save@v4
with:
path: |
~/.pnpm-store
node_modules
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}