9696 - name : Fetch docker buildx layer cache
9797 uses : actions/cache@v4
9898 with :
99- path : tmp/build-cache
99+ path : tmp/build-cache-${{ runner.arch }}
100100 key : ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }}
101101 restore-keys : ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx
102102 enableCrossOsArchive : true
@@ -106,17 +106,17 @@ jobs:
106106 - name : Build docker image
107107 if : runner.arch == 'X64'
108108 run : |
109- bundle exec rake build:x86:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new"
109+ bundle exec rake build:x86:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new"
110110 - name : Build docker image
111111 if : runner.arch == 'ARM64'
112112 run : |
113- bundle exec rake build:arm:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new"
113+ bundle exec rake build:arm:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new"
114114 - name : Show docker images
115115 run : docker images
116116 - name : Update and prune docker buildx layer cache
117117 run : |
118- rm -rf tmp/build-cache
119- mv tmp/build-cache-new tmp/build-cache
118+ rm -rf tmp/build-cache-${{ runner.arch }}
119+ mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }}
120120
121121 - name : Test the generated image
122122 run : bundle exec rake test TEST_PLATFORM=${{ matrix.platform }}
0 commit comments