Files
ersatztv-ffmpeg/.github/workflows/docker.yml
T
Christian BenincasaandJason Dove 9ef9cdef91 parameterize base image and tag to make for easier testing (#24)
* parameterize base image and tag to make for easier testing

I figured this would make for easier testing of new combinations, like
adding Plucky support in order to support things like the Intel N150

* skip docker login for PR

---------

Co-authored-by: Jason Dove <1695733+jasongdove@users.noreply.github.com>
2025-06-27 02:53:11 +00:00

83 lines
2.4 KiB
YAML

name: Build & Publish to Docker Hub
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build_and_push:
name: Build & Publish
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[no build]') == false
strategy:
matrix:
include:
- name: base
path: ''
suffix: ''
qemu: false
- name: arm32v7
path: 'arm32v7.'
suffix: '-arm'
qemu: true
- name: arm64
path: 'arm64.'
suffix: '-arm64'
qemu: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
if: ${{ matrix.qemu == true }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: docker-buildx
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.docker_hub_username }}
password: ${{ secrets.docker_hub_access_token }}
if: ${{ github.ref == 'refs/heads/main' }}
- name: Build and push
uses: docker/build-push-action@v5
with:
builder: ${{ steps.docker-buildx.outputs.name }}
context: .
file: ./${{ matrix.path }}Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
jasongdove/ersatztv-ffmpeg:7.1.1
if: ${{ matrix.name != 'arm64' && matrix.name != 'arm32v7' }}
- name: Build and push
uses: docker/build-push-action@v5
with:
builder: ${{ steps.docker-buildx.outputs.name }}
context: .
file: ./${{ matrix.path }}Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
platforms: 'linux/arm64'
tags: |
jasongdove/ersatztv-ffmpeg:7.1.1${{ matrix.suffix }}
if: ${{ matrix.name == 'arm64' }}
- name: Build and push
uses: docker/build-push-action@v5
with:
builder: ${{ steps.docker-buildx.outputs.name }}
context: .
file: ./${{ matrix.path }}Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
platforms: 'linux/arm/v7'
tags: |
jasongdove/ersatztv-ffmpeg:7.1.1${{ matrix.suffix }}
if: ${{ matrix.name == 'arm32v7' }}