[1.28] CCT-69: Anonymous registration #479
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: tito | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
tito: | |
name: "tito" | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "CentOS Stream 8" | |
image: "quay.io/centos/centos:stream8" | |
- name: "CentOS Stream 9" | |
image: "quay.io/centos/centos:stream9" | |
runs-on: ubuntu-latest | |
container: | |
image: ${{ matrix.image }} | |
steps: | |
- name: Install core packages | |
run: | | |
dnf --setopt install_weak_deps=False install -y \ | |
git-core dnf-plugins-core rpm-build sudo | |
- name: Enable PowerTools repository | |
if: ${{ matrix.name == 'CentOS Stream 8' }} | |
run: | | |
dnf config-manager --enable powertools | |
- name: Enable CRB repository | |
if: ${{ matrix.name == 'CentOS Stream 9' }} | |
run: | | |
dnf config-manager --enable crb | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# This step is required so Tito can properly read git history | |
# See https://github.com/actions/checkout/issues/766 | |
- name: Trust git repository path | |
run: | | |
git config --global --add safe.directory '*' | |
- name: Install npm (Fedora) | |
if: ${{ startsWith(matrix.name, 'Fedora') }} | |
run: | | |
dnf --setopt install_weak_deps=False install -y \ | |
nodejs-npm | |
- name: Install npm (CentOS) | |
if: ${{ startsWith(matrix.name, 'CentOS') }} | |
run: | | |
dnf --setopt install_weak_deps=False install -y \ | |
npm | |
- name: Install packages | |
run: | | |
dnf --setopt install_weak_deps=False builddep -y \ | |
-D '%global python3_pkgversion 3' \ | |
subscription-manager.spec | |
- name: Install tito (using DNF) | |
if: ${{ startsWith(matrix.name, 'Fedora') }} | |
run: | | |
dnf --setopt install_weak_deps=False install -y \ | |
tito | |
- name: Install tito (using pip) | |
if: ${{ startsWith(matrix.name, 'CentOS') }} | |
run: | | |
dnf --setopt install_weak_deps=False install -y \ | |
python3-pip python3-setuptools | |
python3 -m pip install https://github.com/rpm-software-management/tito/archive/refs/tags/tito-0.6.22-1.tar.gz | |
- name: Build the package | |
run: | | |
tito build --output=tito/ --test --rpm | |
- name: Upload RPMs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: RPMs from tito (${{ matrix.name }}) | |
path: tito/ | |
retention-days: 7 |