From 4264a63ce484dc4bcdc0e92f7a18bbc699157e0d Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Thu, 1 Jun 2023 13:37:27 +0200 Subject: [PATCH] GHA: Use explicit registries --- .github/workflows/build-install.yaml | 22 +++++++++++----------- .github/workflows/tests.yaml | 26 +++++++++++++------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-install.yaml b/.github/workflows/build-install.yaml index f5ff7f37..4cdb2b7a 100644 --- a/.github/workflows/build-install.yaml +++ b/.github/workflows/build-install.yaml @@ -27,14 +27,14 @@ jobs: container: # Fedora - - 'fedora:36' - - 'fedora:rawhide' + - 'registry.fedoraproject.org/fedora:36' + - 'registry.fedoraproject.org/fedora:rawhide' # OpenSUSE # leap < 15.2 doesn't contain git-lfs which causes actions/checkout to fail - - 'opensuse/leap:15.3' - - 'opensuse/leap:15.4' - - 'opensuse/tumbleweed' + - 'registry.opensuse.org/opensuse/leap:15.3' + - 'registry.opensuse.org/opensuse/leap:15.4' + - 'registry.opensuse.org/opensuse/tumbleweed' # CentOS Stream - 'quay.io/centos/centos:stream9' @@ -44,7 +44,7 @@ jobs: steps: - name: 'Install packages (OpenSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} + if: ${{ contains(matrix.container, '/opensuse/') }} run: | zypper -n modifyrepo --disable repo-openh264 || : zypper -n --gpg-auto-import-keys refresh @@ -53,7 +53,7 @@ jobs: zypper -n install git-lfs rpm-build - name: 'Install packages (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} + if: ${{ contains(matrix.container, '/fedora:') || contains(matrix.container, '/centos:') }} run: | dnf -y makecache dnf -y distro-sync @@ -64,12 +64,12 @@ jobs: fetch-depth: 0 - name: 'Install build dependencies (OpenSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} + if: ${{ contains(matrix.container, '/opensuse/') }} run: | zypper --non-interactive install $(rpmspec -q --buildrequires contrib/osc.spec) - name: 'Install build dependencies (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} + if: ${{ contains(matrix.container, '/fedora:') || contains(matrix.container, '/centos:') }} run: | dnf -y builddep contrib/osc.spec @@ -83,12 +83,12 @@ jobs: ./contrib/build_rpm.py --srpm --rpm - name: 'Install built RPMs (OpenSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} + if: ${{ contains(matrix.container, '/opensuse/') }} run: | zypper --non-interactive install --force --allow-vendor-change --allow-unsigned-rpm ./contrib/*/*.rpm - name: 'Install build RPMs (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} + if: ${{ contains(matrix.container, '/fedora:') || contains(matrix.container, '/centos:') }} run: | dnf -y install ./contrib/*/*.rpm diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5f154d3a..d29ded98 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -26,31 +26,31 @@ jobs: container: # Fedora - - 'fedora:36' - - 'fedora:rawhide' + - 'registry.fedoraproject.org/fedora:36' + - 'registry.fedoraproject.org/fedora:rawhide' # openSUSE # leap < 15.2 doesn't contain git-lfs which causes actions/checkout to fail - - 'opensuse/leap:15.3' - - 'opensuse/leap:15.4' - - 'opensuse/tumbleweed' + - 'registry.opensuse.org/opensuse/leap:15.3' + - 'registry.opensuse.org/opensuse/leap:15.4' + - 'registry.opensuse.org/opensuse/tumbleweed' # CentOS Stream - 'quay.io/centos/centos:stream9' # Debian - - 'debian:stable' - - 'debian:unstable' + - 'docker.io/library/debian:stable' + - 'docker.io/library/debian:unstable' # Ubuntu - - 'ubuntu:latest' + - 'docker.io/library/ubuntu:latest' container: image: ${{ matrix.container }} steps: - name: 'Install packages (openSUSE)' - if: ${{ startsWith(matrix.container, 'opensuse/') }} + if: ${{ contains(matrix.container, '/opensuse/') }} run: | zypper -n modifyrepo --disable repo-openh264 || : zypper -n --gpg-auto-import-keys refresh @@ -60,7 +60,7 @@ jobs: zypper -n install diffstat diffutils python3 python3-cryptography python3-pip python3-rpm python3-setuptools python3-urllib3 - name: 'Install packages (Fedora/CentOS)' - if: ${{ startsWith(matrix.container, 'fedora:') || contains(matrix.container, 'centos:') }} + if: ${{ contains(matrix.container, '/fedora:') || contains(matrix.container, '/centos:') }} run: | dnf -y makecache dnf -y distro-sync @@ -68,7 +68,7 @@ jobs: dnf -y install diffstat diffutils python3 python3-cryptography python3-pip python3-rpm python3-setuptools python3-urllib3 - name: 'Install packages (Debian/Ubuntu)' - if: ${{ startsWith(matrix.container, 'debian:') || startsWith(matrix.container, 'ubuntu:') }} + if: ${{ contains(matrix.container, '/debian:') || contains(matrix.container, '/ubuntu:') }} run: | apt-get -y update apt-get -y upgrade @@ -84,13 +84,13 @@ jobs: python3 setup.py test - name: 'Generate coverage reports (openSUSE Tumbleweed)' - if: ${{ matrix.container == 'opensuse/tumbleweed' }} + if: ${{ contains(matrix.container, '/opensuse/tumbleweed') }} run: | zypper -n install python3-pytest python3-pytest-cov pytest --cov=osc - name: 'Upload coverage reports to Codecov (openSUSE Tumbleweed)' - if: ${{ matrix.container == 'opensuse/tumbleweed' }} + if: ${{ contains(matrix.container, '/opensuse/tumbleweed') }} uses: codecov/codecov-action@v3 behave: