Skip to content

Build and Publish

Build and Publish #22

Workflow file for this run

name: Build and Publish
on:
create:
tags:
- '*'
jobs:
build-and-push-docker-image:
name: Build Docker image and push to repository
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: polydice/base
tags: type=ref,event=tag
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image and push to Docker Hub
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}