Skip to content

Optimize github action workflow by using dockerhub cache #3

@nilodna

Description

@nilodna

Implement the cache method through the docker hub registry in the github action workflows. This reduces the build time as it will not have to run instructions that have not been impacted by changes in the Dockerfiles and also reduces the number of pulls we complete against Docker Hub.

This should work only by adding the following code at the end of the yaml file:

          builder: ${{ steps.buildx.outputs.name }}
          push: true
          tags: ${{ secrets.DOCKER_USER }}/docker4roms:latest
          cache-from: type=registry,ref=${{ secrets.DOCKER_USER }}/docker4roms:buildcache
          cache-to: type=registry,ref=${{ secrets.DOCKER_USER }}/docker4roms:buildcache,mode=max

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions