Skip to content

Build and push CI containers #134

Build and push CI containers

Build and push CI containers #134

name: Build and push CI containers
on: workflow_dispatch
permissions:
contents: read
checks: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ debian_latest, ubuntu_latest, arch, fedora ]
variant: [ run_base ]
arch: [ x86_64 ]
include:
- os: debian_bullseye
variant: build_base
arch: x86_64
- os: debian_bullseye
variant: build_base
arch: arm64
- os: debian_latest
variant: run_base
arch: arm64
- os: ubuntu_latest
variant: run_base
arch: arm64
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Prepare tag name
run: |
echo "UNIQUETAG=$(date +"%Y%m%d")_git_$(git rev-parse HEAD | cut -c1-8)" | tee -a $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push builder
uses: docker/build-push-action@v4
with:
context: distribution
file: distribution/dockerfiles/${{ matrix.variant }}_${{ matrix.os }}.Dockerfile
push: true
platforms: linux/${{ matrix.arch }}
build-args: |
architecture=${{ matrix.arch }}
tags: |
sandervocke/shoopdaloop_${{ matrix.variant }}_${{ matrix.os }}_${{ matrix.arch }}:latest
sandervocke/shoopdaloop_${{ matrix.variant }}_${{ matrix.os }}_${{ matrix.arch }}:${{ env.UNIQUETAG }}