Skip to content

littlehorse-enterprises/publish-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 

Repository files navigation

Publish Image action

This actions is intended for publishing docker images either to a public registry, or private.

Usage

Workflow permissions

This action requires special permission at workflow level

Github

permissions:
  content: read
  packages: write

ECR

permisions:
  content: read
  id-token: write

Inputs

input required default value description
image-name true "" The image name, in case of ECR it's the repository name
context false . The context path for the docker build
docker-file false ./Dockerfile The path to the Dockerfile to build
github-token false "" Required only when registry is github
registry false github The registry location. Either github or ecr
prefix false "" Prefix to be appended to the image tag, for example branch- will result on <image-name>:branch-master
tags false "" tags strategy configuration. For more information see: https://github.com/docker/metadata-action?tab=readme-ov-file#tags-input
build-args false List of build-time variables

Examples

Publish image to github packages

- name: Build and publish
  uses: littlehorse-enterprises/publish-image@v1
  with:
    image-name: <image-name>
    dockerfile: path/to/Dockerfile
    github-token: ${{ secrets.GITHUB_TOKEN }}

Publish image to ECR

- name: Build and publish
  uses: ittlehorse-enterprises/publish-image@v1
  with:
    image-name: <image-name>
    dockerfile: path/to/Dockerfile
    registry: ecr

Adding image prefix

- name: Build and publish
  uses: ittlehorse-enterprises/publish-image@v1
  with:
    image-name: <image-name>
    dockerfile: path/to/Dockerfile
    prefix: brach-

Adding build-args

- name: Build and publish
  uses: ittlehorse-enterprises/publish-image@v1
  with:
    image-name: <image-name>
    dockerfile: path/to/Dockerfile
    build-args: |
      VERSION=0.0.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •