Skip to content

Commit

Permalink
ci: add latest distribution images
Browse files Browse the repository at this point in the history
Build the following containers and add them as manual testing options.
 - fedora:rawhide
 - debian:sid
 - ubuntu:rolling
  • Loading branch information
jozzsi committed Oct 21, 2024
1 parent 6227ca0 commit 1c74882
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/container-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Mainline/Development/Non-stable version of CI containers

name: Container (Dev)
on:
schedule:
- cron: '30 11 * * *' # every day at 11:30 UTC

pull_request_target

permissions:
packages: write
contents: read

jobs:
amd64:
if: github.repository == 'dracut-ng/dracut-ng' || vars.CONTAINER == 'enabled'
name: ${{ matrix.config.tag }} on ${{ matrix.config.platform }}
runs-on: ubuntu-latest
concurrency:
group: amd64-${{ github.workflow }}-${{ github.ref }}-${{ matrix.config.dockerfile }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
config:
- { dockerfile: 'Dockerfile-debian', tag: 'debian:sid', platform: 'linux/amd64' }
- { dockerfile: 'Dockerfile-fedora', tag: 'fedora:rawhide', platform: 'linux/amd64' }
- { dockerfile: 'Dockerfile-ubuntu', tag: 'ubuntu:rolling', platform: 'linux/amd64' }
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up env
run: echo "repository_owner=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
- name: Build and Push Container
uses: docker/build-push-action@v6
with:
file: test/container/${{ matrix.config.dockerfile }}
push: ${{ github.event_name == 'schedule' }}
platforms: ${{ matrix.config.platform }}
build-args: |
DISTRIBUTION=${{ matrix.config.tag }}
3 changes: 3 additions & 0 deletions .github/workflows/manualtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ on:
- "all"
- "alpine"
- "fedora"
- "fedora:rawhide"
- "arch"
- "debian"
- "debian:sid"
- "ubuntu"
- "ubuntu:rolling"
- "opensuse"
- "gentoo"
- "void"
Expand Down
3 changes: 2 additions & 1 deletion test/container/Dockerfile-debian
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker.io/debian:latest
ARG DISTRIBUTION=debian
FROM docker.io/${DISTRIBUTION}

# dmraid is no longer installed
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056944
Expand Down
3 changes: 2 additions & 1 deletion test/container/Dockerfile-fedora
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM registry.fedoraproject.org/fedora:latest
ARG DISTRIBUTION=fedora
FROM registry.fedoraproject.org/${DISTRIBUTION}

# Install needed packages for the dracut CI container
RUN dnf -y install --setopt=install_weak_deps=False \
Expand Down
3 changes: 2 additions & 1 deletion test/container/Dockerfile-ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM docker.io/ubuntu:latest
ARG DISTRIBUTION=ubuntu
FROM docker.io/${DISTRIBUTION}

# prefer running tests in verbose mode
ENV V=2
Expand Down

0 comments on commit 1c74882

Please sign in to comment.