37 lines
969 B
YAML
37 lines
969 B
YAML
name: Docker Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ "main" ]
|
|
paths-ignore:
|
|
- '**/README.md'
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
config:
|
|
- {arch: 'arm64'}
|
|
- {arch: 'amd64'}
|
|
runs-on: ${{ matrix.config.arch == 'arm64' && 'ubuntu-arm64' || 'ubuntu-amd64' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ vars.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and Push Docker images for all Container Registries
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
tags: ${{ vars.DOCKERHUB_REPO }}:2.10.0-${{matrix.config.arch}} , ${{ vars.DOCKERHUB_REPO }}:latest-${{matrix.config.arch}}
|
|
file: Dockerfile
|
|
push: true
|