Skip to content

Mirror Copr RPMs to archive #673

Mirror Copr RPMs to archive

Mirror Copr RPMs to archive #673

name: Mirror Copr RPMs to archive
on:
workflow_dispatch:
inputs:
dry-run:
description: 'Run only non-destructive commands, skipping the destructive ones'
required: false
type: boolean
default: true
pull_request:
paths:
- .github/workflows/mirror-copr-rpms-to-archive.yml
- .github/scripts/publish-unpublished-rpms-to-archive.sh
- .github/scripts/upload-rpm-to-cloudsmith.sh
branches:
- master
schedule:
- cron: '0 6 * * *'
env:
DRY_RUN: ${{ (inputs.dry-run || github.event_name == 'pull_request') && 'true' || '' }}
jobs:
mirror-copr-rpms-to-archive:
runs-on: ubuntu-latest
container:
image: almalinux:${{ matrix.os_version }}
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
CLOUDSMITH_API_TOKEN: ${{ secrets.CLOUDSMITH_API_TOKEN }}
volumes:
- ${{ github.workspace }}:/workspace
defaults:
run:
working-directory: /workspace
strategy:
matrix:
arch:
- x86_64
- aarch64
os_version:
- '8'
- '9'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install tools
run: |
dnf install -y dnf-plugins-core jq
- name: Publish to ${{ matrix.arch }} mirror (AlmaLinux ${{ matrix.os_version }})
run: |
.github/scripts/publish-unpublished-rpms-to-archive.sh ${{ matrix.arch }} ${{ matrix.os_version }}