Skip to content

Docker

Docker #9367

Workflow file for this run

name: Docker
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Nightly to capture latest base image
schedule:
- cron: '* 21 * * *'
# Run tests for any PRs.
pull_request:
jobs:
dockerhub-registry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ github.repository }}
flavor: |
latest=true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# - name: Trigger re-deployment
# if: ${{ github.event_name != 'pull_request' }}
# uses: distributhor/workflow-webhook@v2
# env:
# webhook_type: 'json-extended'
# webhook_url: ${{ secrets.WEBHOOK_URL }}
# webhook_secret: ${{ secrets.WEBHOOK_SECRET }}