Skip to content

buildx

buildx #1201

Workflow file for this run

name: buildx
on:
schedule:
- cron: 0 0 * * *
push:
branches:
- "**"
workflow_dispatch:
jobs:
buildx:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- autosub
- h5ai
- internetarchive
- pywal
- tcd
- tubeup
- twitch-dl
- twitch-recover
- vlmcsd
- yt-dlp
variant:
- latest
include:
- image: tcd
variant: fork
- image: tubeup
variant: edge
- image: tubeup
variant: fork
- image: twitch-downloader-cli
variant: latest
platforms: linux/amd64
- image: yt-dlp
variant: custom-config
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Clone additional repositories
run: |
case "${{ matrix.image }}" in
# h5ai)
# case "${{ matrix.variant }}" in
# latest)
# git clone https://github.com/awesometic/docker-h5ai h5ai/latest
# ;;
# fork)
# git clone https://github.com/b-ggs/docker-h5ai h5ai/fork
# ;;
# esac
# ;;
vlmcsd)
git clone https://github.com/mikolatero/docker-vlmcsd vlmcsd/latest
;;
esac
- name: Set up Docker args
id: docker_args
run: |
CONTEXT_PATH=./${{ matrix.image }}/${{ matrix.variant }}
FILE_PATH=$CONTEXT_PATH/Dockerfile
IMAGE=bxggs/${{ matrix.image }}
TAG=${{ matrix.variant }}
echo "::set-output name=context_path::$CONTEXT_PATH"
echo "::set-output name=file_path::$FILE_PATH"
echo "::set-output name=tag::$IMAGE:$TAG"
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
platforms: ${{ matrix.platforms || 'linux/amd64,linux/arm64' }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ${{ steps.docker_args.outputs.context_path }}
file: ${{ steps.docker_args.outputs.file_path }}
platforms: ${{ matrix.platforms || 'linux/amd64,linux/arm64' }}
tags: ${{ steps.docker_args.outputs.tag }}
push: true