dockerize #837
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| 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/[email protected] | |
| - 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} |