Skip to content

Build distro images #86

Build distro images

Build distro images #86

Workflow file for this run

name: Build distro images
on:
workflow_dispatch:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: ['rocky-8', 'rocky-9', 'debian-11', 'debian-12', 'fedora', 'ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Parse tag from ref
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR (GitHub Packages)
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: docker/${{ matrix.os }}
build-args: |
BRANCH=${{ steps.vars.outputs.tag }}
push: true
tags: |
opencpu/${{matrix.os}}:latest
opencpu/${{matrix.os}}:${{ steps.vars.outputs.tag }}
ghcr.io/${{github.repository}}/${{matrix.os}}:latest