Skip to content
on:
release:
types: [published]
jobs:
push_to_docker_registry:
name: Build and push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log into Docker Hub
uses: docker/login-action@40891eba8c2bcd1309b07ba8b11232f313e86779
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get metadata for Docker build
id: meta
uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e
with:
images: emberdex/hwsuk-harmony
- name: Build and push Docker image
uses: docker/build-push-action@f9efed53cc1b0364ba947400ac02042bbbaac7fc
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}