48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Build and Publish Docker Images
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- dockerfile: worker.Dockerfile
|
|
image-name: ben/auto-transcoder-worker
|
|
- dockerfile: server.Dockerfile
|
|
image-name: ben/auto-transcoder-server
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.brmartin.co.uk
|
|
username: ben
|
|
password: ${{ github.token }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and Push Image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ${{ matrix.dockerfile }}
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: |
|
|
git.brmartin.co.uk/${{ matrix.image-name }}:${{ github.ref_name }}
|
|
git.brmartin.co.uk/${{ matrix.image-name }}:${{ github.sha }}
|