Skip to content

Docker

Docker #12

Workflow file for this run

---
name: Docker
on:
workflow_dispatch:
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
inputs:
tag:
description: "The Docker Image Tag"
required: false
default: "latest"
type: string
jobs:
build:
env:
DOCKER_REGISTRY: ghcr.io
DOCKER_BUILD_TAG: ghcr.io/llaville/php-compatinfo-db:${{ github.event.inputs.tag || 'latest' }}
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- # https://github.com/actions/checkout
name: Checkout code
uses: actions/checkout@v4
- # https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- # https://github.com/docker/setup-buildx-action
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- # https://github.com/docker/login-action
name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- # https://github.com/docker/build-push-action
name: Build and push Docker images
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ env.DOCKER_BUILD_TAG }}