diff --git a/.github/workflows/check-licenses.yml b/.github/workflows/check-licenses.yml index b96eccedc..1551b6d2c 100644 --- a/.github/workflows/check-licenses.yml +++ b/.github/workflows/check-licenses.yml @@ -14,14 +14,16 @@ jobs: name: Build runs-on: ubuntu-latest steps: + - name: Code checkout + uses: actions/checkout@master + - name: Setup Go + id: go uses: actions/setup-go@main with: go-version: stable cache: false - id: go - - name: Code checkout - uses: actions/checkout@master + - name: Cache Go artifacts uses: actions/cache@v3 with: @@ -29,7 +31,8 @@ jobs: ~/.cache/go-build ~/go/pkg/mod ~/go/bin - key: go-artifacts-${{ runner.os }}-check-licenses-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} + key: go-artifacts-${{ runner.os }}-check-licenses-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} restore-keys: go-artifacts-${{ runner.os }}-check-licenses- + - name: Check License run: make check-licenses diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f37755abf..ed62202c4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Go + id: go uses: actions/setup-go@v4 with: go-version: stable @@ -42,7 +43,7 @@ jobs: ~/.cache/go-build ~/go/pkg/mod ~/go/bin - key: go-artifacts-${{ runner.os }}-check-all-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} + key: go-artifacts-${{ runner.os }}-check-all-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} restore-keys: go-artifacts-${{ runner.os }}-check-all- - name: Run check-all @@ -72,7 +73,7 @@ jobs: ~/.cache/go-build ~/go/pkg/mod ~/go/bin - key: go-artifacts-${{ runner.os }}-crossbuild-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} + key: go-artifacts-${{ runner.os }}-crossbuild-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} restore-keys: go-artifacts-${{ runner.os }}-crossbuild- - name: Build @@ -90,6 +91,7 @@ jobs: uses: actions/checkout@v4 - name: Setup Go + id: go uses: actions/setup-go@v4 with: go-version: stable @@ -102,7 +104,7 @@ jobs: ~/.cache/go-build ~/go/pkg/mod ~/go/bin - key: go-artifacts-${{ runner.os }}-${{ matrix.scenario }}-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} + key: go-artifacts-${{ runner.os }}-${{ matrix.scenario }}-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.sum', 'Makefile', 'app/**/Makefile') }} restore-keys: go-artifacts-${{ runner.os }}-${{ matrix.scenario }}- - name: run tests