2019-08-21 22:23:44 +02:00
2019-08-18 13:35:01 +02:00
2019-08-21 22:23:44 +02:00
2019-08-21 22:23:44 +02:00
2019-08-21 22:23:44 +02:00
2019-02-23 13:07:02 +01:00
2019-02-27 13:57:10 +01:00
2019-08-21 22:23:44 +02:00
2019-03-17 19:53:22 +01:00
2019-08-21 22:23:44 +02:00

Publishes docker containers to Dockerhub

Actions Status

This Action for Docker uses the Git branch as the Docker tag for building and pushing the container to DockerHub. Hereby the master-branch is published as the latest-tag.

Usage

New workflow

name: Publish Docker
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Login to Registry
      run: docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
    - name: Publish to Registry
      uses: elgohr/Publish-Docker-Github-Action@master
      with:
        args: myDocker/repository
    - name: Logout
      run: docker logout

Optional Arguments

Push an additional image, which is tagged with the git sha. When you would like to think about versioning images, this might be useful.

with:
  args: myDocker/repository
  snapshot: true

Old workflow

workflow "Publish Docker" {
  on = "push"
  resolves = ["logout"]
}

action "login" {
  uses = "actions/docker/login@master"
  secrets = ["DOCKER_PASSWORD", "DOCKER_USERNAME"]
}

action "publish" {
  uses = "elgohr/Publish-Docker-Github-Action@master"
  args = "myDocker/repository"
  needs = ["login"]
}

action "logout" {
  uses = "actions/docker/cli@master"
  args = "logout"
  needs = ["publish"]
}

Docker builds

Please see https://github.com/elgohr/Publish-Docker-Github-Action/packages

Argument

You need to provide the desired docker repository to the action.

Description
No description provided
Readme MIT 564 KiB
Languages
Shell 96.8%
Dockerfile 2.9%
Makefile 0.3%