Skip to content

Build image

Build image #5

Workflow file for this run

name: Build image
on:
workflow_dispatch:
inputs:
imageTag:
description: 'Tag of the docker image'
required: true
default: 'latest'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/kubernetes-docker-client:${{ github.event.inputs.imageTag }}
${{ secrets.DOCKERHUB_USERNAME }}/kubernetes-docker-client:latest
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}