Skip to content

dockerize

dockerize #695

Workflow file for this run

---
name: dockerize
on:
workflow_dispatch:
push:
branches:
- 'next'
- 'main'
- 'exp'
schedule:
- cron: '0 */12 * * *'
defaults:
run:
shell: bash
jobs:
dockerize:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- {os: 'alpine', dh: 'refenv/alpine-bash', ver: 'latest'}
- {os: 'archlinux', dh: 'archlinux', ver: 'latest'}
- {os: 'centos', dh: 'tgagor/centos', ver: 'stream9'}
- {os: 'debian', dh: 'debian', ver: 'packaging'}
- {os: 'debian', dh: 'debian', ver: 'bookworm'}
- {os: 'debian', dh: 'debian', ver: 'bullseye'}
- {os: 'debian', dh: 'debian', ver: 'trixie'}
- {os: 'fedora', dh: 'fedora', ver: '39'}
- {os: 'fedora', dh: 'fedora', ver: '40'}
- {os: 'fedora', dh: 'fedora', ver: '41'}
- {os: 'fedora', dh: 'fedora', ver: 'citools'}
- {os: 'gentoo', dh: 'gentoo/stage3', ver: 'latest'}
- {os: 'opensuse-tumbleweed', dh: 'opensuse/tumbleweed', ver: 'latest'}
- {os: 'oraclelinux', dh: 'oraclelinux', ver: '9'}
- {os: 'rockylinux', dh: 'rockylinux', ver: '9.2'}
- {os: 'ubuntu', dh: 'ubuntu', ver: 'focal'}
- {os: 'ubuntu', dh: 'ubuntu', ver: 'jammy'}
- {os: 'ubuntu', dh: 'ubuntu', ver: 'lunar'}
env:
XNVME_REF: dockerize-for-${{ github.ref_name }}
DOCKER_TAG: ${{ github.ref_name }}
steps:
- name: Grab xnvme-docker
uses: actions/checkout@v4.1.7
- name: Grab xNVMe
run: |
mkdir -p builddir/xnvme
curl -L https://github.com/OpenMPDK/xNVMe/tarball/${XNVME_REF} -o xnvme.tgz
tar xzf xnvme.tgz --strip-components=1 -C builddir/xnvme
- name: Build
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/xnvme-deps-${{ matrix.container.os }}-${{ matrix.container.ver }}:${DOCKER_TAG}
docker build \
-t $IMAGE_ID \
-f dockerfiles/${{ matrix.container.os }}/${{ matrix.container.ver }}/Dockerfile \
builddir
- name: Log into GitHub Container Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push to ghcr.io
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/xnvme-deps-${{ matrix.container.os }}-${{ matrix.container.ver }}:${DOCKER_TAG}
docker push ${IMAGE_ID}