ci: add dockerhub-description
workflow
#77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: 'Build docker images' | |
on: | |
push: | |
branches: ['main'] | |
paths: | |
- '**.Dockerfile' | |
- '.github/workflows/build-and-push.yml' | |
schedule: | |
- cron: '0 1 1 * *' | |
jobs: | |
docker: | |
name: 'Build and push' | |
runs-on: 'ubuntu-latest' | |
strategy: | |
matrix: | |
include: | |
- tag: 'amazonlinux-2023' | |
dockerfile: 'amazonlinux/2023.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'centos-7' | |
dockerfile: 'centos/7.Dockerfile' | |
platforms: 'linux/amd64' | |
- tag: 'debian-10' | |
dockerfile: 'debian/10.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'debian-11' | |
dockerfile: 'debian/11.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'debian-12' | |
dockerfile: 'debian/12.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'rockylinux-8' | |
dockerfile: 'rockylinux/8.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'rockylinux-9' | |
dockerfile: 'rockylinux/9.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'ubuntu-18.04' | |
dockerfile: 'ubuntu/18.04.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'ubuntu-20.04' | |
dockerfile: 'ubuntu/20.04.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
- tag: 'ubuntu-22.04' | |
dockerfile: 'ubuntu/22.04.Dockerfile' | |
platforms: | |
- 'linux/amd64' | |
- 'linux/arm64' | |
steps: | |
- name: 'Checkout the codebase' | |
uses: 'actions/checkout@v4' | |
- 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' | |
uses: 'docker/login-action@v3' | |
with: | |
username: 'antmelekhin' | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: 'Build and push ${{ matrix.tag }}' | |
uses: 'docker/build-push-action@v6' | |
with: | |
context: . | |
file: '${{ matrix.dockerfile }}' | |
platforms: '${{ matrix.platforms }}' | |
push: true | |
tags: 'antmelekhin/docker-systemd:${{ matrix.tag }}' |