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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 persist-credentials: false - name: Setup Python uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.13" - name: requests-cache uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 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 tox run: | python -m pip install --upgrade pip pip install tox - name: Update Plugin List run: tox -e update-plugin-list - name: Create Pull Request id: pr uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 with: commit-message: '[automated] Update plugin list' author: 'pytest bot ' 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 }} PULL_REQUEST_NUMBER: ${{ steps.pr.outputs.pull-request-number }} run: >- gh pr comment --body 'Please mark the PR as ready for review to trigger PR checks.' --repo '${{ github.repository }}' "$PULL_REQUEST_NUMBER"