Skip to content

Deploy on changes to dockerfile, or manual dispatch #8

Deploy on changes to dockerfile, or manual dispatch

Deploy on changes to dockerfile, or manual dispatch #8

name: Build and push master image to Dockerhub
on:
push:
paths:
- "Dockerfile"
workflow_dispatch:
inputs: null
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout bedhost repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: databio/bedhost
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}