Skip to content

Allow manual update

Allow manual update #3

Workflow file for this run

name: Docker Image CI
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
THIS: "ebullient/pandoc-emoji"
TAG: "3.1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ github.repository }}
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,enable=true,priority=200,prefix=,suffix=,value=${{ env.TAG }}
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
if: github.repository == ${{ env.THIS }} && github.ref == 'refs/heads/main'
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}