From b93d4857065178280580f8b7ed48be64d31db3c0 Mon Sep 17 00:00:00 2001
From: Paulin Todev <paulin.todev@gmail.com>
Date: Thu, 23 Jan 2025 13:20:41 +0000
Subject: [PATCH] Enable cache in build

---
 .github/workflows/build.yml | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 3882d88f66..ba59458a5f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -22,7 +22,7 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: go.mod
-        cache: false
+        cache: true
     - run: make generate-ui
     - run: GO_TAGS="builtinassets promtail_journal_enabled" GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM= make alloy
 
@@ -46,7 +46,7 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: go.mod
-        cache: false
+        cache: true
     - run: make generate-ui
     - run: GO_TAGS="builtinassets promtail_journal_enabled" GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} GOARM= GOEXPERIMENT=boringcrypto make alloy
 
@@ -60,7 +60,7 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: go.mod
-        cache: false
+        cache: true
     - run: make generate-ui
     - run: GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make alloy
 
@@ -74,7 +74,7 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: go.mod
-        cache: false
+        cache: true
     - run: make generate-ui
     - run: GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make alloy
 
@@ -88,7 +88,7 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: go.mod
-        cache: false
+        cache: true
     - run: make generate-ui
     # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#setting-an-environment-variable
     - run: echo "GO_TAGS=builtinassets" | Out-File -FilePath $env:GITHUB_ENV -Append
@@ -112,6 +112,6 @@ jobs:
       uses: actions/setup-go@v5
       with:
         go-version-file: go.mod
-        cache: false
+        cache: true
     - run: make generate-ui
     - run: GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make alloy