Skip to content

Check new packages versions and make pull requests #902

Check new packages versions and make pull requests

Check new packages versions and make pull requests #902

Workflow file for this run

---
name: Check new packages versions and make pull requests
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: '00 23 * * *'
jobs:
update-ebuilds:
runs-on: ubuntu-latest
# Image already contains portage tree
container:
image: ghcr.io/woomymy/docker-euscan:main
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JQ and zip
run: emerge app-misc/jq app-arch/zip
- uses: Woomymy/action-run-euscan@main
- name: Find new versions
run: bash .github/bin/proceed-reports.sh
- name: Generate Matrix
id: matrix
run: .github/bin/generate-matrix.sh
generate-prs:
needs: ["update-ebuilds"]
runs-on: ubuntu-latest
if: ${{ needs.update-ebuilds.outputs.matrix != '[]' && needs.update-ebuilds.outputs.matrix != '' }}
strategy:
matrix:
packages: ${{fromJSON(needs.update-ebuilds.outputs.matrix)}}
steps:
- uses: actions/checkout@v2
- name: Change branch
run: |
git branch ${{ matrix.packages.name }}
- name: Download generated ebuild and Manifest
run: |
rm -rf ${{ matrix.packages.name }}
wget -O update.zip ${{ matrix.packages.upload_url }}
yes | unzip -o update.zip
rm update.zip
- name: Commit changes
run: |
git config --global user.name Woomy-Overlay-Action
git config --global user.email ${{ github.actor }}@users.noreply.github.com
git add -A
git add ${{ matrix.packages.name }}
git commit -sm "${{ matrix.packages.name }}: Update to ${{ matrix.packages.version }}"
git checkout main
- name: Create pull request
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ matrix.packages.name }}
title: "Update ${{ matrix.packages.name }} to ${{ matrix.packages.version }}"
reviewers: Woomymy
assignees: Woomymy
delete-branch: true
body: |
Automatic update of ${{ matrix.packages.name }} to ${{ matrix.packages.version }}.
labels: auto-update,package-update