mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 07:12:27 +00:00
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.
This commit is contained in:
parent
e477777f49
commit
8ae9db3b2d
30
.github/workflows/build-syncthing.yaml
vendored
30
.github/workflows/build-syncthing.yaml
vendored
@ -175,6 +175,11 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
check-latest: true
|
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
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -223,6 +228,11 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
check-latest: true
|
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
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -265,6 +275,11 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
check-latest: true
|
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
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -387,6 +402,11 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
check-latest: true
|
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
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
@ -561,6 +581,11 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
check-latest: true
|
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
|
- uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '3.0'
|
ruby-version: '3.0'
|
||||||
@ -728,6 +753,11 @@ jobs:
|
|||||||
cache: false
|
cache: false
|
||||||
check-latest: true
|
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
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
Loading…
Reference in New Issue
Block a user