diff --git a/.github/workflows/container-dev.yml b/.github/workflows/container-dev.yml new file mode 100644 index 000000000..77318444e --- /dev/null +++ b/.github/workflows/container-dev.yml @@ -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 }} diff --git a/.github/workflows/manualtest.yml b/.github/workflows/manualtest.yml index 55178f91f..c5547b45f 100644 --- a/.github/workflows/manualtest.yml +++ b/.github/workflows/manualtest.yml @@ -14,9 +14,12 @@ on: - "all" - "alpine" - "fedora" + - "fedora:rawhide" - "arch" - "debian" + - "debian:sid" - "ubuntu" + - "ubuntu:rolling" - "opensuse" - "gentoo" - "void" diff --git a/test/container/Dockerfile-debian b/test/container/Dockerfile-debian index d26d90a56..f9df68a03 100644 --- a/test/container/Dockerfile-debian +++ b/test/container/Dockerfile-debian @@ -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 diff --git a/test/container/Dockerfile-fedora b/test/container/Dockerfile-fedora index 2739f8984..b62f420b1 100644 --- a/test/container/Dockerfile-fedora +++ b/test/container/Dockerfile-fedora @@ -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 \ diff --git a/test/container/Dockerfile-ubuntu b/test/container/Dockerfile-ubuntu index 5e65ac9ae..9ccf3e689 100644 --- a/test/container/Dockerfile-ubuntu +++ b/test/container/Dockerfile-ubuntu @@ -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