[dependabot]: Bump pulpcore from 3.63.5 to 3.63.6 in /automation #64
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: Update package after dependabot merge | |
on: | |
push: | |
paths: | |
- automation/requirements.txt | |
branches: | |
- 'rpm/develop' | |
env: | |
GIT_AUTHOR_NAME: Foreman Packaging Automation | |
GIT_AUTHOR_EMAIL: [email protected] | |
PACKAGE_TO_UPDATE: package_list.txt | |
jobs: | |
generate_package_list: | |
name: "Generate Package List" | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Sort Updated Libs | |
run: git diff --unified=0 ${{github.event.before}} ${{github.sha}} automation/requirements.txt | grep -Po '(?<=^\+)(?!\+\+).*' > $PACKAGE_TO_UPDATE | |
- name: Parse Package List | |
id: set-matrix | |
run: ./build_matrix.py < $PACKAGE_TO_UPDATE | |
bump-rpms: | |
name: 'Bump ${{ matrix.package_name }} RPM ${{ matrix.new_version }}' | |
needs: generate_package_list | |
if: ${{ needs.generate_package_list.outputs.matrix != '[]' }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{ fromJson(needs.generate_package_list.outputs.matrix) }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y --no-install-recommends python3-rpm rpm git-annex python3-semver | |
sudo curl --create-dirs -o /usr/local/bin/spectool https://pagure.io/rpmdevtools/raw/26a8abc746fba9c0b32eb899b96c92841a37855a/f/spectool.in | |
sudo curl --create-dirs -o /usr/local/bin/rpmdev-bumpspec https://pagure.io/rpmdevtools/raw/6f387c1deaa5cbed770310e288abde04b17421dc/f/rpmdev-bumpspec | |
sudo curl --create-dirs -o /usr/local/bin/rpmdev-vercmp https://pagure.io/rpmdevtools/raw/79740e6f1881e399b0b4340a8090dd5adc91a4ea/f/rpmdev-vercmp | |
printf '#!/bin/bash\necho "$GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL>"' | sudo tee /usr/local/bin/rpmdev-packager | |
sudo chmod +x /usr/local/bin/spectool /usr/local/bin/rpmdev-* | |
git config --global user.name "$GIT_AUTHOR_NAME" | |
git config --global user.email "$GIT_AUTHOR_EMAIL" | |
- name: Initialize git annex | |
run: git annex init | |
- name: Update Packages | |
run: ./update_packages.sh ${{ matrix.package_name }} ${{ matrix.new_version }} | |
- name: Open a PR | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: "Update ${{ matrix.package_name }} to ${{ matrix.new_version }}" | |
branch: "bump_rpm/${{ matrix.package_name }}" | |
title: "Update ${{ matrix.package_name }} to ${{ matrix.new_version }}" | |
body: '' | |
delete-branch: true |