2020-09-03 00:15:17 +00:00
|
|
|
name: Build FFmpeg
|
|
|
|
|
2020-09-03 17:20:10 +00:00
|
|
|
on:
|
|
|
|
push: []
|
|
|
|
schedule:
|
|
|
|
- cron: '0 12 * * *'
|
2020-09-03 00:15:17 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build_base:
|
|
|
|
name: Build base image
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-09-03 01:13:45 +00:00
|
|
|
- name: Pull latest
|
|
|
|
run: docker pull btbn/ffmpeg-builder:base || true
|
2020-09-03 00:15:17 +00:00
|
|
|
- name: Build and push base
|
|
|
|
uses: docker/build-push-action@v1
|
|
|
|
with:
|
2020-09-03 01:13:45 +00:00
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
2020-09-03 12:41:26 +00:00
|
|
|
always_pull: true
|
2020-09-03 12:48:32 +00:00
|
|
|
cache_froms: btbn/ffmpeg-builder:base
|
2020-09-03 01:13:45 +00:00
|
|
|
repository: btbn/ffmpeg-builder
|
2020-09-03 00:54:36 +00:00
|
|
|
tags: base
|
2020-09-03 14:33:29 +00:00
|
|
|
path: images/base
|
2020-09-03 00:15:17 +00:00
|
|
|
build_target_bases:
|
2020-09-03 12:41:26 +00:00
|
|
|
name: Build target base image
|
2020-09-03 00:15:17 +00:00
|
|
|
needs: build_base
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [win64]
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2020-09-03 01:13:45 +00:00
|
|
|
- name: Pull latest
|
|
|
|
run: docker pull btbn/ffmpeg-builder:base-${{ matrix.target }} || true
|
2020-09-03 00:15:17 +00:00
|
|
|
- name: Build and push target base
|
|
|
|
uses: docker/build-push-action@v1
|
|
|
|
with:
|
2020-09-03 01:13:45 +00:00
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
2020-09-03 12:41:26 +00:00
|
|
|
always_pull: true
|
2020-09-03 12:48:32 +00:00
|
|
|
cache_froms: btbn/ffmpeg-builder:base-${{ matrix.target }}
|
2020-09-03 01:13:45 +00:00
|
|
|
repository: btbn/ffmpeg-builder
|
2020-09-03 00:54:36 +00:00
|
|
|
tags: base-${{ matrix.target }}
|
2020-09-03 14:33:29 +00:00
|
|
|
path: images/base-${{ matrix.target }}
|
2020-09-03 00:15:17 +00:00
|
|
|
build_targets:
|
2020-09-03 12:41:26 +00:00
|
|
|
name: Build target-variant image
|
2020-09-03 00:15:17 +00:00
|
|
|
needs: build_target_bases
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [win64]
|
2020-09-03 17:24:00 +00:00
|
|
|
variant: [gpl,lgpl,gpl-4.2,lgpl-4.2]
|
2020-09-03 00:15:17 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Generate Dockerfile
|
|
|
|
run: ./generate.sh ${{ matrix.target }} ${{ matrix.variant }}
|
2020-09-03 01:13:45 +00:00
|
|
|
- name: Pull latest
|
|
|
|
run: docker pull btbn/ffmpeg-builder:${{ matrix.target }}-${{ matrix.variant }} || true
|
2020-09-03 00:15:17 +00:00
|
|
|
- name: Build and push target base
|
|
|
|
uses: docker/build-push-action@v1
|
|
|
|
with:
|
2020-09-03 01:13:45 +00:00
|
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
|
|
password: ${{ secrets.DOCKER_TOKEN }}
|
2020-09-03 12:41:26 +00:00
|
|
|
always_pull: true
|
2020-09-03 12:48:32 +00:00
|
|
|
cache_froms: btbn/ffmpeg-builder:${{ matrix.target }}-${{ matrix.variant }}
|
2020-09-03 01:13:45 +00:00
|
|
|
repository: btbn/ffmpeg-builder
|
2020-09-03 00:54:36 +00:00
|
|
|
tags: ${{ matrix.target }}-${{ matrix.variant }}
|
2020-09-03 14:33:29 +00:00
|
|
|
build_ffmpeg:
|
|
|
|
name: Build ffmpeg
|
|
|
|
needs: build_targets
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [win64]
|
2020-09-03 17:24:00 +00:00
|
|
|
variant: [gpl,lgpl,gpl-4.2,lgpl-4.2]
|
2020-09-03 14:40:19 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build ffmpeg
|
|
|
|
run: ./build.sh ${{ matrix.target }} ${{ matrix.variant }}
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ffmpeg
|
|
|
|
path: artifacts/*
|
2020-09-03 15:19:35 +00:00
|
|
|
publish_release:
|
|
|
|
name: Publish release
|
2020-09-04 14:19:36 +00:00
|
|
|
if: github.event_name == 'schedule'
|
2020-09-03 15:19:35 +00:00
|
|
|
needs: build_ffmpeg
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ffmpeg
|
2020-09-03 15:42:29 +00:00
|
|
|
path: artifacts
|
2020-09-03 15:19:35 +00:00
|
|
|
- name: Create release
|
2020-09-03 16:27:19 +00:00
|
|
|
run: |
|
|
|
|
set -xe
|
|
|
|
NAME="Auto-Build $(date +'%Y-%m-%d %H:%M')"
|
|
|
|
TAGNAME="autobuild-$(date +'%Y-%m-%d-%H-%M')"
|
|
|
|
hub release create $(for a in artifacts/*; do echo -a $a; done) -m "$NAME" -t "master" "$TAGNAME"
|
2020-09-03 15:19:35 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|