[automated] RHEL9 packages added #5
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: Udpate RHEL9 RPM repo | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- repo/rhel/9/*.rpm | |
- .github/workflows/rhel9-update-repo.yml | |
workflow_dispatch: | |
inputs: | |
force_recreate_repo: | |
description: 'Force recreate RPM repository' | |
required: false | |
type: boolean | |
default: false | |
jobs: | |
rhel9-update-repo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
sparse-checkout: | | |
repo/rhel/9 | |
scripts/rhel/9 | |
ssh-key: ${{ secrets.DEPLOY_SSH_KEY }} | |
- name: Update RHEL9 RPM repository | |
run: > | |
docker run --rm | |
-v ${{ github.workspace }}/repo/rhel/9:/repo | |
-v ${{ github.workspace }}/scripts/rhel/9:/scripts:ro | |
-e FORCE_RECREATE_REPO=$FORCE_RECREATE_REPO | |
-e GPG_SIGNING_KEY=$GPG_SIGNING_KEY | |
rockylinux:9 | |
/bin/bash /scripts/update-repo.sh | |
env: | |
FORCE_RECREATE_REPO: ${{ inputs.force_recreate_repo }} | |
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }} | |
- name: Commit RHEL9 RPM repo | |
run: | | |
git config --global user.name 'GitHub build bot' | |
git config --global user.email '[email protected]' | |
(git add repo/rhel/9/repodata && git commit -m "[automated] RHEL9 RPM repo updated" && git push) || echo "No new packages found, skip updating." |