Skip to content

Commit

Permalink
imp #12: Added cache for the go packages as well
Browse files Browse the repository at this point in the history
  • Loading branch information
donkeyx committed Sep 23, 2023
1 parent 3444ee1 commit 3ea32d2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Cache Go packages
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: go-${{ runner.os }}-${{ hashFiles('**/*.go') }}
restore-keys: |
go-${{ runner.os }}-
- name: Cache Docker layers
uses: actions/cache@v2
with:
Expand All @@ -27,6 +37,11 @@ jobs:
restore-keys: |
docker-${{ runner.os }}-
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
Expand Down Expand Up @@ -75,4 +90,4 @@ jobs:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: docker.io/donkeyx/cluster-utils-api:{{ steps.meta.outputs.tags }}
tags: docker.io/donkeyx/cluster-utils-api:${{ steps.meta.outputs.tags }}

0 comments on commit 3ea32d2

Please sign in to comment.