Skip to content

Commit

Permalink
Add cache control
Browse files Browse the repository at this point in the history
  • Loading branch information
origamiofficial committed Oct 7, 2024
1 parent c6ccc7b commit 5cc5a15
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build-and-push-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ jobs:
cache-to: |
type=registry,ref=${{ secrets.DOCKERHUB_NAMESPACE }}/docker-cache:buildcache.pihole-unbound.${{ inputs.BuildImageTag }},mode=max
-
name: Build and push [development-v6]
if: inputs.BuildImageTag == 'development-v6'
name: Build and push [development-v6 / use cache]
if: inputs.BuildImageTag == 'development-v6' && inputs.UseOldCache == 'true'
uses: docker/build-push-action@v6
env:
IMAGE_TAG: ${{ inputs.BuildImageTag }}
Expand All @@ -212,6 +212,22 @@ jobs:
type=registry,ref=${{ secrets.DOCKERHUB_NAMESPACE }}/docker-cache:buildcache.pihole-unbound.${{ inputs.BuildImageTag }}
cache-to: |
type=registry,ref=${{ secrets.DOCKERHUB_NAMESPACE }}/docker-cache:buildcache.pihole-unbound.${{ inputs.BuildImageTag }},mode=max
-
name: Build and push [development-v6 / no cache]
if: inputs.BuildImageTag == 'development-v6' && inputs.UseOldCache == 'false'
uses: docker/build-push-action@v6
env:
IMAGE_TAG: ${{ inputs.BuildImageTag }}
with:
context: ./
file: ./Dockerfile-Dev-V6
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v6
build-args: BASE_IMG_TAG=${{ inputs.BuildImageTag }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-to: |
type=registry,ref=${{ secrets.DOCKERHUB_NAMESPACE }}/docker-cache:buildcache.pihole-unbound.${{ inputs.BuildImageTag }},mode=max
-
name: Build and push [platform]
if: inputs.BuildPlatform != 'N/A'
Expand Down

0 comments on commit 5cc5a15

Please sign in to comment.