Skip to content

put the commands back in as an if #6

put the commands back in as an if

put the commands back in as an if #6

Workflow file for this run

name: docker-hawccel-matrix-build
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
env:
IMAGE_NAME: stash-s6
jobs:
builds-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: "linux/amd64"
arch: "amd64"
tag: "amd64"
- platform: "linux/arm64"
arch: "arm64"
tag: "arm64"
- platform: "linux/arm/v6"
arch: "armel"
tag: "armv6"
- platform: "linux/arm/v7"
arch: "armhf"
tag: "armv7"
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v3
with:
platforms: arm,arm64
- uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: setup image names
run: |
echo "GHCR_IMAGE=ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}" >> "$GITHUB_ENV"
echo "DHIO_IMAGE=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}" >> "$GITHUB_ENV"
- name: build hwaccel-base for local use
uses: docker/build-push-action@v4
with:
push: true
provenance: false
file: hwaccel-base.Dockerfile
platforms: ${{ matrix.platform }}
tags: |
localhost:5000/stash-s6:hwaccel-base
cache-from: type=gha
cache-to: type=gha,mode=max
- name: build hwaccel
uses: docker/build-push-action@v4
with:
push: true
provenance: false
file: hwaccel.Dockerfile
build-args: |
UPSTREAM_IMAGE=localhost:5000/stash-s6
platforms: ${{ matrix.platform }}
tags: |
${{ env.GHCR_IMAGE }}:hwaccel-${{ matrix.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: build hwaccel-lscr amd64
# specific to amd64
if: ${{ matrix.platform == 'linux/amd64' }}
uses: docker/build-push-action@v4
with:
push: true
provenance: false
file: hwaccel-lscr.Dockerfile
build-args: |
UPSTREAM_IMAGE=localhost:5000/stash-s6
platforms: linux/amd64
tags: |
${{ env.GHCR_IMAGE }}:hwaccel-lscr-amd64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: build hwaccel-lscr arm64
# specific to ARM64
if: ${{ matrix.platform == 'linux/arm64' }}
uses: docker/build-push-action@v4
with:
push: true
provenance: false
file: hwaccel-lscr-aarch64.Dockerfile
build-args: |
UPSTREAM_IMAGE=localhost:5000/stash-s6
platforms: linux/arm64
tags: |
${{ env.GHCR_IMAGE }}:hwaccel-lscr-arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- name: build hwaccel-jf
# no support for ARMEL
if: ${{ matrix.platform != 'linux/arm/v6' }}
uses: docker/build-push-action@v4
with:
push: true
provenance: false
file: hwaccel-jf.Dockerfile
build-args: |
ARCHITECTURE=${{ matrix.arch }}
UPSTREAM_IMAGE=localhost:5000/stash-s6
platforms: ${{ matrix.platform }}
tags: |
${{ env.GHCR_IMAGE }}:hwaccel-jf-${{ matrix.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
create-manifests:
needs: [builds-matrix]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: setup image names
run: |
echo "GHCR_IMAGE=ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}" >> "$GITHUB_ENV"
echo "DHIO_IMAGE=docker.io/${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}" >> "$GITHUB_ENV"
- name: create manifest for GHCR/hwaccel
run: |
docker manifest create \
${{ env.GHCR_IMAGE }}:hwaccel \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-amd64 \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-armv6 \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-armv7 \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-arm64
docker manifest push ${{ env.GHCR_IMAGE }}:hwaccel
- name: create manifest for GHCR/hwaccel-lscr
run: |
docker manifest create \
${{ env.GHCR_IMAGE }}:hwaccel-lscr \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-lscr-amd64 \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-lscr-arm64
docker manifest push ${{ env.GHCR_IMAGE }}:hwaccel-lscr
- name: create manifest for GHCR/hwaccel-jf
run: |
docker manifest create \
${{ env.GHCR_IMAGE }}:hwaccel-jf \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-jf-amd64 \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-jf-armv7 \
--amend ${{ env.GHCR_IMAGE }}:hwaccel-jf-arm64
docker manifest push ${{ env.GHCR_IMAGE }}:hwaccel-jf