@@ -37,7 +37,10 @@ concurrency:
3737 group : ${{ github.workflow }}-${{ github.ref }}
3838 cancel-in-progress : true
3939
40- permissions : read-all
40+ permissions :
41+ contents : read
42+ # buildx type=gha cache-to needs write on private repos; harmless on public
43+ actions : write
4144
4245jobs :
4346 build :
@@ -117,6 +120,15 @@ jobs:
117120 if : steps.check.outputs.run == 'true'
118121 uses : docker/setup-buildx-action@v4
119122
123+ # type=gha only persists reliably via docker/build-push-action (or bake-action).
124+ # Scopes match .github/workflows/e2e-image-cache.yml (main warms caches for
125+ # first-run PRs; PR jobs can restore from the default branch).
126+ - name : Pull service images
127+ if : steps.check.outputs.run == 'true'
128+ working-directory : .devcontainer
129+ # Tags come from compose.yaml (SSOT); only Hub services — not keycloak.
130+ run : docker compose pull redis
131+
120132 - name : Build Keycloak image with CAS protocol
121133 if : steps.check.outputs.run == 'true'
122134 uses : docker/build-push-action@v7
@@ -125,8 +137,8 @@ jobs:
125137 tags : keycloak:cas
126138 push : false
127139 load : true
128- cache-from : type=gha
129- cache-to : type=gha,mode=max
140+ cache-from : type=gha,scope=keycloak
141+ cache-to : type=gha,scope=keycloak, mode=max
130142
131143 - name : Start Keycloak
132144 if : steps.check.outputs.run == 'true'
0 commit comments