Skip to content

Latest commit

 

History

History
60 lines (51 loc) · 2.17 KB

README.md

File metadata and controls

60 lines (51 loc) · 2.17 KB

dockerbuildandpush-action

A GitHub Action to build and push a docker image into GitHub Container registry written in TypeScript

License Issues

Usage

    ...
    - name: Build and push docker image
      uses: randlabs/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag: v1.0.0
    ...

Inputs

inputs:
  tag:
    description: 'Tag name'
    required: true
  username:
    description: 'Username used to log against the GitHub Container registry. Defaults to {github.actor} context variable.'
    required: false
  password:
    description: 'Password or personal access token used to log against the GitHub Container registry. Defaults to GITHUB_TOKEN environment variable.'
    required: false
  labels:
    description: 'Custom docker image labels.'
    required: false
  dockerfile:
    description: 'Location of the dockerfile file. Defaults to ./dockerfile. If a relative path is given, base path will be the "path" input.'
    required: false
  customdockerfile:
    description: 'Custom dockerfile instructions. If present, will override "dockerfile" input.'
    required: false
  path:
    description: 'Relative path under $GITHUB_WORKSPACE to set as the default directory. Defaults to "."'
    required: false
  repo:
    description: 'Target repository in <owner-or-company>/<repository> format. Defaults to the one that fired the action.'
    required: false

Environment variables:

GITHUB_TOKEN must be set to the workflow's token or the personal access token (PAT) required to accomplish the task if password input is not provided.