diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f55c08e0b..180cd4556a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,15 @@ jobs: access_token: ${{ secrets.GITHUB_TOKEN }} - name: Checkout Repository uses: actions/checkout@v2 + - name: Cache Go controller tools + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-tools-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-tools- - name: Output Variables id: vars run: | @@ -77,6 +86,15 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Cache Go build + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-build- - name: Setup Golang Environment uses: actions/setup-go@v2 with: @@ -102,6 +120,15 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v2 + - name: Cache Go tests + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-tests-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-tests- - name: Setup Golang Environment uses: actions/setup-go@v2 with: @@ -219,6 +246,15 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Cache Go build + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-build- - name: Setup Golang Environment uses: actions/setup-go@v2 with: diff --git a/.github/workflows/update-docker-images.yml b/.github/workflows/update-docker-images.yml index 3466804386..01e0b111cd 100644 --- a/.github/workflows/update-docker-images.yml +++ b/.github/workflows/update-docker-images.yml @@ -92,6 +92,15 @@ jobs: with: fetch-depth: 0 ref: refs/tags/v${{ needs.variables.outputs.kic-tag }} + - name: Cache Go build + uses: actions/cache@v2 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-build- - name: Setup Golang Environment uses: actions/setup-go@v2 with: