This PR fixes an issue where only the latest image cache was available.
For other minor improvements, see the individual commit messages.
This PR fixes an issue where only the latest image cache was available.
For other minor improvements, see the individual commit messages.
19       id: main_builder
20       continue-on-error: true
21       with:
22         context: .
23         file: ${{ inputs.dockerfile }}
24-        tags: ${{ inputs.tag }}
tags parameter is actually supposed to do. Did you figure this out?
              
            22         context: .
23         file: ${{ inputs.dockerfile }}
24-        tags: ${{ inputs.tag }}
25         load: true
26-        cache-from: type=gha
27+        cache-from: type=gha,scope=${{ runner.arch }}
{{input.tag}} here (and maybe rename tag to scope)?
              
            I think we’re talking past each other. (But sorry, my message was very unclear.) My suggestion is to add an input parameter to the run-in-docker-action that is used as a prefix to scope, i.e., the caller sets the scope.
In our case, the caller could then set scope=ci-image-${{ runner.arch }} or something like this.
 2@@ -3,10 +3,8 @@ description: 'Run a command in a Docker container, while passing explicitly set
 3 inputs:
 4   dockerfile:
 5     description: 'A Dockerfile that defines an image'
 6-    required: true
 7-  tag:
 8-    description: 'A tag of an image'
 9-    required: true
10+    required: false
11+    default: ./ci/linux-debian.Dockerfile
It seems unlikely that this action would be reused elsewhere.
True, but I think it’s still a good idea to drop the default. It simply decreases coupling.
0@@ -1,5 +1,7 @@
1 FROM debian:stable-slim
2 
3+ENV DEBIAN_FRONTEND=noninteractive
This change fixes an issue where only the latest image cache was
available.
          
The `tags` input is unused for caching.
          
See https://github.com/docker/build-push-action/releases.
          
This suppresses `debconf: unable to initialize frontend: ...` warnings.
          Thank you for the review! Your feedback has been addressed.