File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88runs :
99 using : ' composite'
1010 steps :
11+ # On self-hosted runners, the env.ImageOS variable may not be set correctly, which can cause issues with the cache key.
12+ # We need to handle this case to ensure the cache key is consistent.
13+ - name : Set ImageOS
14+ if : ${{ runner.os == 'Linux' && env.ImageOS == '' }}
15+ shell : bash
16+ # Key is ubuntu<MAJOR>, as there is not other linux os in GHA other than Ubuntu
17+ run : echo "ImageOS=ubuntu$(lsb_release -rs | cut -d. -f1)" >> $GITHUB_ENV
18+
1119 - name : Find Latest Release Branch
1220 shell : bash
1321 run : |
4149 # Match the cache key to the setup-go action https://github.com/actions/setup-go/blob/main/src/cache-restore.ts#L34
4250 key : setup-go-${{ runner.os }}-${{ env.ImageOS }}-go-${{ env.GO_VERSION }}-${{ hashFiles('go.sum') }}
4351 restore-keys : |
44- setup-go-${{ runner.os }}-
52+ setup-go-${{ runner.os }}-${{ env.ImageOS }}-go-${{ env.GO_VERSION }}-
You can’t perform that action at this time.
0 commit comments