Skip to content

Migrate workflow to mirror Copr RPMs into Cloudsmith archive to Github Actions #5

Migrate workflow to mirror Copr RPMs into Cloudsmith archive to Github Actions

Migrate workflow to mirror Copr RPMs into Cloudsmith archive to Github Actions #5

name: Mirror Copr RPMs to archive
on:
workflow_dispatch:
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
push:
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
- glebashnik/gh-action-mirror-copr-rpms-to-archive
schedule:
- cron: '0 6 * * *'
jobs:
mirror-copr-rpms-to-archive:
runs-on: ubuntu-latest
container:
image: almalinux:8
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
CLOUDSMITH_API_TOKEN: ${{ secrets.CLOUDSMITH_API_TOKEN }}
volumes:
- ${{ github.workspace }}:/workspace
defaults:
run:
working-directory: /workspace
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install tools
run: |
dnf install -y dnf-plugins-core jq
- name: Publish to x86-64 mirror
run: |
.github/scripts/publish-unpublished-rpms-to-archive.sh x86_64
- name: Publish to aarch64 mirror
run: |
.github/scripts/publish-unpublished-rpms-to-archive.sh aarch64