1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-08 13:56:15 +01:00

Merge pull request #1338 from dmach/gha-explicit-registries

GHA: Use explicit registries
This commit is contained in:
Daniel Mach 2023-06-01 13:59:43 +02:00 committed by GitHub
commit ac21d2b5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 24 deletions

View File

@ -27,14 +27,15 @@ 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/leap:15.5'
- 'registry.opensuse.org/opensuse/tumbleweed'
# CentOS Stream
- 'quay.io/centos/centos:stream9'
@ -44,7 +45,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 +54,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 +65,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 +84,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

View File

@ -26,31 +26,32 @@ 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/leap:15.5'
- '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 +61,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 +69,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 +85,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: