diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index 1f43114..3ee4bf9 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -17,11 +17,11 @@ runs: using: "composite" steps: - uses: docker/setup-qemu-action@v2 - if: contains(fromJSON(steps.check-changes.outputs.projects), inputs.project) || inputs.force-deploy == 'true' + if: inputs.force-deploy == 'true' - uses: docker/setup-buildx-action@v2 if: contains(fromJSON(steps.check-changes.outputs.projects), inputs.project) || inputs.force-deploy == 'true' - uses: docker/login-action@v2 - if: contains(fromJSON(steps.check-changes.outputs.projects), inputs.project) || inputs.force-deploy == 'true' + if: inputs.force-deploy == 'true' with: registry: ghcr.io username: ${{ github.actor }} @@ -31,7 +31,11 @@ runs: uses: docker/build-push-action@v4 if: inputs.force-deploy == 'true' with: + cache-from: type=gha + cache-to: type=gha,mode=max + context: . push: ${{ inputs.push }} + provenance: false tags: | ghcr.io/ministryofjustice/${{ inputs.project }}:latest ghcr.io/ministryofjustice/${{ inputs.project }}:${{ inputs.version }}