Skip to content

Commit b4fc653

Browse files
committed
build: dont hash dist files in cache key [build]
1 parent 3716660 commit b4fc653

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/cache@v4
3333
with:
3434
path: ./cli/dist
35-
key: ${{ runner.os }}-cli-${{ hashFiles('cli/**', 'go.mod', 'go.sum') }}
35+
key: ${{ runner.os }}-cli-${{ hashFiles('cli/[!dist]**', 'cli/**/[!dist]**', 'go.mod', 'go.sum') }}
3636

3737
build_cli:
3838
needs: check_cli_cache
@@ -69,7 +69,7 @@ jobs:
6969
uses: actions/cache/save@v4
7070
with:
7171
path: ./cli/dist
72-
key: ${{ runner.os }}-cli-${{ hashFiles('cli/**', 'go.mod', 'go.sum') }}
72+
key: ${{ runner.os }}-cli-${{ hashFiles('cli/[!dist]**', 'cli/**/[!dist]**', 'go.mod', 'go.sum') }}
7373

7474
- name: Upload Artifact
7575
uses: actions/upload-artifact@v4
@@ -89,7 +89,7 @@ jobs:
8989
uses: actions/cache/restore@v4
9090
with:
9191
path: ./cli/dist
92-
key: ${{ runner.os }}-cli-${{ hashFiles('cli/**', 'go.mod', 'go.sum') }}
92+
key: ${{ runner.os }}-cli-${{ hashFiles('cli/[!dist]**', 'cli/**/[!dist]**', 'go.mod', 'go.sum') }}
9393
fail-on-cache-miss: true
9494

9595
- name: Setup keychain

0 commit comments

Comments
 (0)