Skip to content

Build for all supported Ubuntu releases #7

Build for all supported Ubuntu releases

Build for all supported Ubuntu releases #7

name: Build container images
on:
push:
branches:
- main
schedule:
# Basically picked at random to try and be a low-load time for GitHub Actions
- cron: '20 3 * * 0'
workflow_dispatch:
jobs:
build_push_images:
runs-on: ubuntu-latest
strategy:
matrix:
# curl https://api.launchpad.net/devel/ubuntu/series | jq '.entries[] | select(.supported == true and .active == true) | .version' | tr '\n' ' ' | sed -e 's/^/[/' -e 's/ $/]/' -e 's/ /, /g'
# The above command actually grabs Ubuntu ESM-supported releases too, but the Launchpad API doesn't give a way to differentiate these out so who cares
version: ["24.04", "22.04", "20.04", "18.04", "16.04", "14.04"]
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
steps:
- name: Log in to GitHub Container Registry
uses: redhat-actions/podman-login@v1
with:
username: ${{ github.actor }}
password: ${{ github.token }}
# TODO use {{ github.repository_owner }} when https://github.com/redhat-actions/podman-login/issues/44 is fixed
registry: ghcr.io/seagl
- name: Checkout Repo
uses: actions/checkout@v1
- name: Build and push container images
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: ./build-and-push.sh ${{ matrix.version }}