Skip to content

Build your docker images, caching each stage to improve building times

License

Notifications You must be signed in to change notification settings

harmeetdhingra/docker-build-with-cache-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker Build-with-cache action

This action builds your docker image, caching the stages to improve building times in subsequent builds.

Inputs

docker_username

Required Docker's registry user.

docker_password

Required Docker's registry password.

docker_registry

Docker registry (default: Docker Hub's registry).

image_name

Required Docker's registry user.

image_tag

Required Tag of the image to build.

context

Docker context (default: ./).

push_image_and_stages

Set to false to avoid pushing to registry (default: true).

You might want to set this option to false if you plan to use this action for PRs to avoid overriding cached stages in the registry.

Outputs

None

Example usage

  - uses: ./.github/actions/build-and-push-with-cache
    with:
      docker_username: "${{ secrets.DOCKER_USERNAME }}"
      docker_password: "${{ secrets.DOCKER_PASSWORD }}"
      image_name: ${{ github.actor }}/node
      image_tag: alpine-slim

About

Build your docker images, caching each stage to improve building times

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 91.3%
  • Dockerfile 8.7%