Skip to content

Builds and pushes Docker images and logs in to a Docker registry w/ BuildKit SSH support!

Notifications You must be signed in to change notification settings

Leukocyte-Lab/build-n-push

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build n' Push

Builds and pushes Docker images and logs in to a Docker registry.

Features

Inputs

Example

Features

  • BuildKit SSH support

Inputs

repository

Required Docker repository

username

Required Username used to log in to a Docker registry.

password

Required Password used to log in to a Docker registry.

tags

Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags.

Example:

tags: v1,v1.0

path

Path to the build context. Default to .

dockerfile

Path to the Dockerfile. Defaults to {path}/Dockerfile

Note this path is not releative to the path but is relative to the working directory.

push

Boolean value. Defaults to true.

Whether to push the built image.

ssh_private_key

SSH private key for BuildKit to fetch private data in builds.

ssh

Boolean value. Default to false.

Whether to add --ssh default into build command.

Example

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

About

Builds and pushes Docker images and logs in to a Docker registry w/ BuildKit SSH support!

Resources

Stars

Watchers

Forks

Packages

No packages published