Skip to content

momentum-xyz/docker-build-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github action to build docker image

Shared build steps for Odyssey projects to build a docker image from a github repositry.

This generates a version based on git branch or tag. Builds a docker image, using the repositories Dockerfile. Pushes and tags the image, with git commit hash and the generated version.

Usage

      - id: build
        uses: OdysseyMomentumExperience/docker-build-action@v1
        with:
          registry-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
          registry-user: ${{ secrets.REGISTRY_USERNAME }}
          registry-pass: ${{ secrets.REGISTRY_PASSWORD }}
          npm-token: ${{ secrets.NPM_TOKEN }}

(replace v1 with the appropriate version tag or commit hash)

Inputs

Name Description Default
image-name Name of the created docker image The name of the repository
registry-server (required) Docker registry location/URL
registry-user (required) Docker registry username for authentication
registry-pass (required) Docker registry password for authentication
npm-token Github access token (PAT) to access private npm packages
multistage-target Docker build target for multistage builds.
extra-args Additional arguments added to the docker build call.

Outputs

Name Description
version The generated version string, e.g. 'v1.2.3' or 'latest'

About

Github action to build docker image

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •