aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2023-11-13 12:20:40 +0100
committerGitHub <noreply@github.com>2023-11-13 12:20:40 +0100
commit8ae9db3b2d43c68bb4af7f49ebf9004e0dce93e1 (patch)
tree76de928cff536123b3f1ff86f6ca68eac02aab98 /.github
parente477777f49ab2dd7cf3f29b88b4254ddb7e79f9b (diff)
downloadsyncthing-8ae9db3b2d43c68bb4af7f49ebf9004e0dce93e1.tar.gz
syncthing-8ae9db3b2d43c68bb4af7f49ebf9004e0dce93e1.zip
build: Use actual Go version as cache key (#9216)
We use `env.GO_VERSION` as cache key for the build cache, but this is nowadays typically something like `~1.21.1` which doesn't change when 1.21.2, 1.21.3 etc are released, making the cache fairly useless as everything gets rebuilt. This re-sets the `GO_VERSION` variable after installing Go so that it contains the actual installed version.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-syncthing.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/build-syncthing.yaml b/.github/workflows/build-syncthing.yaml
index f55e99212..630e3fece 100644
--- a/.github/workflows/build-syncthing.yaml
+++ b/.github/workflows/build-syncthing.yaml
@@ -175,6 +175,11 @@ jobs:
cache: false
check-latest: true
+ - name: Get actual Go version
+ run: |
+ go version
+ echo "GO_VERSION=$(go version | sed 's#^.*go##;s# .*##')" >> $GITHUB_ENV
+
- uses: actions/cache@v3
with:
path: |
@@ -223,6 +228,11 @@ jobs:
cache: false
check-latest: true
+ - name: Get actual Go version
+ run: |
+ go version
+ echo "GO_VERSION=$(go version | sed 's#^.*go##;s# .*##')" >> $GITHUB_ENV
+
- uses: actions/cache@v3
with:
path: |
@@ -265,6 +275,11 @@ jobs:
cache: false
check-latest: true
+ - name: Get actual Go version
+ run: |
+ go version
+ echo "GO_VERSION=$(go version | sed 's#^.*go##;s# .*##')" >> $GITHUB_ENV
+
- uses: actions/cache@v3
with:
path: |
@@ -387,6 +402,11 @@ jobs:
cache: false
check-latest: true
+ - name: Get actual Go version
+ run: |
+ go version
+ echo "GO_VERSION=$(go version | sed 's#^.*go##;s# .*##')" >> $GITHUB_ENV
+
- uses: actions/cache@v3
with:
path: |
@@ -561,6 +581,11 @@ jobs:
cache: false
check-latest: true
+ - name: Get actual Go version
+ run: |
+ go version
+ echo "GO_VERSION=$(go version | sed 's#^.*go##;s# .*##')" >> $GITHUB_ENV
+
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
@@ -728,6 +753,11 @@ jobs:
cache: false
check-latest: true
+ - name: Get actual Go version
+ run: |
+ go version
+ echo "GO_VERSION=$(go version | sed 's#^.*go##;s# .*##')" >> $GITHUB_ENV
+
- uses: actions/cache@v3
with:
path: |