37 lines
968 B
YAML
37 lines
968 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
image_tag:
|
|
description: 'Docker Image Tag'
|
|
required: true
|
|
default: 'dev'
|
|
platforms:
|
|
description: 'Build Platforms'
|
|
required: true
|
|
default: 'linux/amd64,linux/arm64'
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
platforms: ${{ github.event.inputs.platforms }}
|
|
push: true
|
|
file: ./selfhosted.Dockerfile
|
|
tags: 'keglin/pinchflat:${{ github.event.inputs.image_tag }}'
|