@@ -110,51 +110,14 @@ jobs:
110110 with :
111111 ruby-version : " 3.3"
112112 bundler-cache : true
113- - name : Generate docker image names
114- id : rcd_config
115- run : |
116- bundle exec ruby -e ' \
117- require "rake_compiler_dock"; \
118- print "image_name_opt=-t "; \
119- puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}})); \
120- print "snapshot_name_opt=-t "; \
121- puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}}), :version => %q(snapshot)); \
122- if %q(${{matrix.platform}}).end_with?("-gnu"); \
123- print "generic_linux_snapshot_name_opt=-t "; \
124- puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}}), :version => %q(snapshot)).chomp("-gnu"); \
125- end \
126- ' | tee -a $GITHUB_OUTPUT
127-
128-
129- bundle exec ruby -e ' \
130- require "rake_compiler_dock"; \
131- print "image_name="; \
132- puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}})); \
133- if %q(${{matrix.platform}}).end_with?("-gnu"); \
134- print "generic_linux_image_name="; \
135- puts RakeCompilerDock::Starter.container_image_name(:platform => %q(${{matrix.platform}})).chomp("-gnu"); \
136- end \
137- ' | tee -a $GITHUB_OUTPUT
138- - name : Build docker image
139- env :
140- RCD_DOCKER_BUILD : docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new
141- run : |
142- docker buildx create --driver docker-container --use
143- bundle exec rake build:x86:${{matrix.platform}}
144- # move build cache and remove outdated layers
145- rm -rf tmp/build-cache
146- mv tmp/build-cache-new tmp/build-cache
147113 - uses : docker/login-action@v3
148114 with :
149115 registry : ghcr.io
150116 username : ${{github.actor}}
151117 password : ${{secrets.GITHUB_TOKEN}}
152- - name : Push the docker image
153- run : |
154- docker images
155- docker push ${{steps.rcd_config.outputs.image_name}}
156- - name : Push a generic linux image
157- if : ${{ steps.rcd_config.outputs.generic_linux_image_name }}
118+ - name : Use cache and push docker image
119+ env :
120+ RCD_DOCKER_BUILD : docker buildx build --cache-from=type=local,src=tmp/build-cache-X64 --cache-from=type=local,src=tmp/build-cache-ARM64 --cache-to=type=local,dest=tmp/build-cache-new
158121 run : |
159- docker tag ${{steps.rcd_config.outputs.image_name}} ${{steps.rcd_config.outputs.generic_linux_image_name}}
160- docker push ${{steps.rcd_config.outputs.generic_linux_image_name }}
122+ docker buildx create --driver docker-container --use
123+ bundle exec rake release: ${{matrix.platform }}
0 commit comments