Skip to content

Commit

Permalink
Fix docker buildx caching
Browse files Browse the repository at this point in the history
  • Loading branch information
flounderpinto committed Dec 8, 2023
1 parent ff16bfa commit bb5f04d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/workflow-build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions

name: CI

on:
Expand All @@ -18,9 +16,9 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# - name: Docker build branch
# run: make docker
# if: ${{ github.ref_type == 'branch' }}
- name: Docker build branch
run: make docker
if: ${{ github.ref_type == 'branch' }}

- name: Docker build main
run: make docker ARGS="-t latest"
Expand Down
2 changes: 1 addition & 1 deletion src/dockerBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function dockerBuild
buildCmd="${buildCmd} -t $DOCKER_REGISTRY/$DOCKER_REPO:$i"
done
buildCmd="${buildCmd} --cache-from type=registry,ref=$DOCKER_REGISTRY/$DOCKER_REPO"
buildCmd="${buildCmd} --cache-to type=registry,ref=$DOCKER_REGISTRY/$DOCKER_REPO,mode=max"
buildCmd="${buildCmd} --cache-to type=inline"
buildCmd="${buildCmd} -f $DOCKER_FILE $BUILD_CONTEXT_DIR 2>&1"

#Create a new builder instance
Expand Down

0 comments on commit bb5f04d

Please sign in to comment.