action-tag

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 6 Imported by: 0

README

action-tag

GitHub action which generates Docker image tags from Git commit metadata.

Motivation

This action basically does what docker/build-push-action provides as built-in functionality. So why separate action? Unfortunately, docker/build-push-action doesn't provide any output, so you can't use generated tags in further workflow steps. Workaround could be assigning a commit hash, or a build number as an additional tag, but these tend to be less informative than semantic versions.

Usage

- name: Generate tags
  id: tags
  uses: akabos/action-tag@master

- name: Build
  run: |
    docker build . \
      -t ${GITHUB_REPOSITORY}:${{ steps.tags.outputs.ref }} \ 
      -t ${GITHUB_REPOSITORY}:${{ steps.tags.outputs.sha }} \ 
      -t ${GITHUB_REPOSITORY}:${{ steps.tags.outputs.serial }}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL