FFmpeg-Builds/.github/workflows/build.yml
2020-09-03 14:48:32 +02:00

69 lines
2.2 KiB
YAML

name: Build FFmpeg
on: [push]
jobs:
build_base:
name: Build base image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull latest
run: docker pull btbn/ffmpeg-builder:base || true
- name: Build and push base
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
always_pull: true
cache_froms: btbn/ffmpeg-builder:base
repository: btbn/ffmpeg-builder
tags: base
path: base
build_target_bases:
name: Build target base image
needs: build_base
runs-on: ubuntu-latest
strategy:
matrix:
target: [win64]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pull latest
run: docker pull btbn/ffmpeg-builder:base-${{ matrix.target }} || true
- name: Build and push target base
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
always_pull: true
cache_froms: btbn/ffmpeg-builder:base-${{ matrix.target }}
repository: btbn/ffmpeg-builder
tags: base-${{ matrix.target }}
path: base-${{ matrix.target }}
build_targets:
name: Build target-variant image
needs: build_target_bases
runs-on: ubuntu-latest
strategy:
matrix:
target: [win64]
variant: [gpl,lgpl]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Generate Dockerfile
run: ./generate.sh ${{ matrix.target }} ${{ matrix.variant }}
- name: Pull latest
run: docker pull btbn/ffmpeg-builder:${{ matrix.target }}-${{ matrix.variant }} || true
- name: Build and push target base
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
always_pull: true
cache_froms: btbn/ffmpeg-builder:${{ matrix.target }}-${{ matrix.variant }}
repository: btbn/ffmpeg-builder
tags: ${{ matrix.target }}-${{ matrix.variant }}