Update Plugin List #194
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 Plugin List | |
on: | |
schedule: | |
# At 00:00 on Sunday. | |
# https://crontab.guru | |
- cron: '0 0 * * 0' | |
workflow_dispatch: | |
# Set permissions at the job level. | |
permissions: {} | |
jobs: | |
update-plugin-list: | |
if: github.repository_owner == 'pytest-dev' | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
cache: pip | |
- name: requests-cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pytest-plugin-list/ | |
key: plugins-http-cache-${{ github.run_id }} # Can use time based key as well | |
restore-keys: plugins-http-cache- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install packaging requests tabulate[widechars] tqdm requests-cache platformdirs | |
- name: Update Plugin List | |
run: python scripts/update-plugin-list.py | |
- name: Create Pull Request | |
id: pr | |
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c | |
with: | |
commit-message: '[automated] Update plugin list' | |
author: 'pytest bot <pytestbot@users.noreply.github.com>' | |
branch: update-plugin-list/patch | |
delete-branch: true | |
branch-suffix: short-commit-hash | |
title: '[automated] Update plugin list' | |
body: '[automated] Update plugin list' | |
draft: true | |
- name: Instruct the maintainers to trigger CI by undrafting the PR | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
run: >- | |
gh pr comment | |
--body 'Please mark the PR as ready for review to trigger PR checks.' | |
--repo '${{ github.repository }}' | |
'${{ steps.pr.outputs.pull-request-number }}' |