sintonia/.github/workflows/container.yml

89 lines
2.3 KiB
YAML
Raw Normal View History

2022-09-08 12:52:00 +02:00
name: Container
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
2022-09-08 12:52:00 +02:00
jobs:
build:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
NAMESPACE: ${{ github.repository_owner }}
if: ${{ github.repository_owner == 'libretime' }}
steps:
- uses: actions/checkout@v3
2022-09-14 20:31:19 +02:00
- uses: docker/setup-buildx-action@v2
2022-09-08 12:52:00 +02:00
- uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Guess LIBRETIME_VERSION
run: |
make VERSION
echo "LIBRETIME_VERSION=$(cat VERSION | tr -d [:blank:])" >> $GITHUB_ENV
2022-09-14 20:31:19 +02:00
- name: Build python-builder
uses: docker/build-push-action@v4
2022-09-14 20:31:19 +02:00
with:
context: .
pull: true
target: python-builder
cache-from: type=gha,scope=python-builder
cache-to: type=gha,scope=python-builder,mode=max
- name: Build python-base
uses: docker/build-push-action@v4
2022-09-14 20:31:19 +02:00
with:
context: .
pull: true
target: python-base
cache-from: type=gha,scope=python-base
cache-to: type=gha,scope=python-base,mode=max
- name: Build python-base-ffmpeg
uses: docker/build-push-action@v4
2022-09-14 20:31:19 +02:00
with:
context: .
pull: true
target: python-base-ffmpeg
cache-from: type=gha,scope=python-base-ffmpeg
cache-to: type=gha,scope=python-base-ffmpeg,mode=max
- name: Build analyzer
2022-09-08 12:52:00 +02:00
uses: ./.github/workflows/actions/build-container
with:
target: libretime-analyzer
2022-09-14 20:31:19 +02:00
- name: Build api
2022-09-08 12:52:00 +02:00
uses: ./.github/workflows/actions/build-container
with:
target: libretime-api
2022-09-14 20:31:19 +02:00
- name: Build playout
2022-09-08 12:52:00 +02:00
uses: ./.github/workflows/actions/build-container
with:
target: libretime-playout
2022-09-14 20:31:19 +02:00
- name: Build worker
2022-09-08 12:52:00 +02:00
uses: ./.github/workflows/actions/build-container
with:
target: libretime-worker
2022-09-14 20:31:19 +02:00
- name: Build legacy
2022-09-08 12:52:00 +02:00
uses: ./.github/workflows/actions/build-container
with:
target: libretime-legacy