Builds and pushes Docker images and logs in to a Docker registry.
- BuildKit SSH support
Required Docker repository
Required Username used to log in to a Docker registry.
Required Password used to log in to a Docker registry.
Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags.
Example:
tags: v1,v1.0Path to the build context. Default to .
Path to the Dockerfile. Defaults to {path}/Dockerfile
Note this path is not releative to the path but is relative to the working directory.
Boolean value. Defaults to true.
Whether to push the built image.
SSH private key for BuildKit to fetch private data in builds.
Boolean value. Default to false.
Whether to add --ssh default into build command.
steps:
  - name: Checkout code
    uses: actions/checkout@v2
  - name: Build n' Push images
    uses: Leukocyte-Lab/build-n-push@v1
    env:
      DOCKER_BUILDKIT: 1
    with:
      ssh: true
      ssh_private_key: ${{ secrets.SSH_KEY }}
      repository: myorg/myrepo
      username: ${{ secrets.REGISTRY_USERNAME }}
      password: ${{ secrets.REGISTRY_PASSWORD }}
      registry: registry.myregistry.com
      tags: latest,v1