Git auto updater #8
Workflow file for this run
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 Requirements | |
on: | |
pull_request: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.8 # Any default version for running the script | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pru | |
- name: Run requirements updater script | |
id: run_pru | |
run: | | |
bash .github/scripts/update_requirements.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Pull Request if requirements updated | |
if: steps.run_pru.outputs.updated == 'true' | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: | | |
Update requirements based on failed tests | |
- Updated files: ${{ steps.run_pru.outputs.updated_files }} | |
- Date: ${{ steps.run_pru.outputs.update_date }} | |
branch: update-requirements-${{ github.run_id }} | |
title: 'Update requirements on ${{ steps.run_pru.outputs.update_date }}' | |
body: | | |
This PR updates the following requirements files based on the output of failed tests: | |
- ${{ steps.run_pru.outputs.updated_files }} | |
Date of update: ${{ steps.run_pru.outputs.update_date }} | |
labels: update, automated-pr |