Skip to content

Publish Docker image #13

Publish Docker image

Publish Docker image #13

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Publish Docker image
on:
workflow_dispatch:
inputs:
version:
description: 'Version to release'
required: false
default: '1.10.0'
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
build-args: |
AVRO_VERSION=${{ github.event.inputs.version }}
tags: |
kpnnl/avro-tools:latest
kpnnl/avro-tools:${{ github.event.inputs.version }}
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
short-description: ${{ github.event.repository.description }}
repository: "kpnnl/avro-tools"