Skip to content

Commit

Permalink
Caching when building
Browse files Browse the repository at this point in the history
  • Loading branch information
frli4797 committed Oct 30, 2024
1 parent 93c4052 commit c267092
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,24 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
restore-keys: |
${{ runner.os }}-buildx-
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8
tags: ${{ vars.DOCKER_HUB_USER }}/ish:latest
platforms: linux/amd64,linux/arm64 #, linux/arm/v7, linux/arm/v8
tags: ${{ vars.DOCKER_HUB_USER }}/ish:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache,new=true

0 comments on commit c267092

Please sign in to comment.