Giter Site home page Giter Site logo

docker-version-tag's Introduction

GitHub Action for Docker Version Tag

Quick and dirty GitHub Action that tags a specified image with it's version label, given a Dockerfile for that image.

The Docker Tag action is supposed to do this (and more!) without needing to be given a Dockerfile but it seems to run into trouble when running docker inspect (not allowed on GitHub Actions, I think). Until that action is fixed, this action provides a workaround.

Usage

This action takes two or three arguments: the image to be tagged (must already be built), the image name (without tags), and the Dockerfile for the image (if not provided, this defaults to Dockerfile). For example:

action "version-tag" {
    uses = "docker://rrbutani/docker-version-tag"
    args = "base octocat/base env/Dockerfile"
}

This action will look for, in order (not case sensitive):

  • ARG VERSION
  • ENV VERSION
  • LABEL version
  • LABEL "version"

The first of these that are found will be used to tag the image. This action doesn't check to make sure that the version found is valid semver.

If none of the above are found, the image isn't tagged and the action returns a neutral status code (78).

docker-version-tag's People

Contributors

rrbutani avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.