Skip to content

Build container image #10

Build container image

Build container image #10

Workflow file for this run

# Build a Docker/Podman container with dash-mpd-cli and its external helper applications.
# We currently build for Linux/AMD64 and for Linux/aarch64.
name: Build container image
on: workflow_dispatch
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
jobs:
build-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
name: Build and push container/Linux
steps:
- name: Install qemu
run: sudo apt install qemu-user-static
- name: Checkout sources
uses: actions/checkout@v4
- name: Log in to ghcr.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}
# We use "buildah build" instead of "podman build", because we are seeing errors on the older
# version of podman installed on the runners.
- name: Build container images with podman
id: build-image
run: |
podman manifest create dash-mpd-cli
buildah build -f etc/Containerfile_linux_amd64 --arch amd64 --tag dash-mpd-cli-linux-amd64 --manifest dash-mpd-cli .
buildah build -f etc/Containerfile_linux_aarch64 --arch arm64/v8 --tag dash-mpd-cli-linux-aarch64 --manifest dash-mpd-cli .
- name: Push container image
id: push-to-registry
uses: redhat-actions/push-to-registry@v2
with:
image: dash-mpd-cli
tags: latest
registry: ${{ env.IMAGE_REGISTRY }}