Build kernel development containers #99
This file contains 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: Build kernel development containers | |
# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- 'intel/**' | |
paths: | |
- '.github/workflows/container.yml' | |
- 'container/**' | |
pull_request: | |
branches: | |
- 'intel/**' | |
paths: | |
- '.github/workflows/container.yml' | |
- 'container/**' | |
schedule: | |
- cron: "11 18 * * 1" | |
workflow_dispatch: | |
jobs: | |
container: | |
permissions: | |
packages: write | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- image: fedora-kernel-devel | |
container: fedora-kernel-devel | |
tag: '39' | |
- image: fedora-kernel-devel | |
container: fedora-kernel-devel | |
tag: '40' | |
- image: fedora-kernel-devel | |
container: fedora-kernel-devel | |
tag: 'rawhide' | |
- image: centos-kernel-devel | |
container: centos-8-kernel-devel | |
tag: '8.2.2004' | |
- image: centos-kernel-devel | |
container: centos-8-kernel-devel | |
tag: '8.3.2011' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '8' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '8.4' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '8.6' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '8.8' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '9' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '9.0' | |
- image: rockylinux-kernel-devel | |
container: rockylinux-8-kernel-devel | |
tag: '9.2' | |
- image: debian-kernel-devel | |
container: debian-12-kernel-devel | |
tag: '12' | |
- image: ubuntu-kernel-devel | |
container: ubuntu-22.04-kernel-devel | |
tag: '20.04' | |
- image: ubuntu-kernel-devel | |
container: ubuntu-22.04-kernel-devel | |
tag: '22.04' | |
env: | |
image: ghcr.io/ofs/linux-dfl-backport/${{ matrix.image }}:${{ matrix.tag }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Build kernel development image | |
run: docker build --build-arg tag=${{ matrix.tag }} -t "$image" -f container/${{ matrix.container }}/Dockerfile . | |
- name: Log in to registry | |
if: github.event_name != 'pull_request' | |
run: echo "$token" | docker login ghcr.io -u "$GITHUB_REPOSITORY_OWNER" --password-stdin | |
env: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push image to registry | |
if: github.event_name != 'pull_request' | |
run: docker image push "$image" |