🧪 Make a draft based plugin bump PR CI trigger
Normally, PRs/commits published using the default GitHub Actions CI/CD API token are not propagated to any integrations. This patch marks the plugin update PR as a draft and leaves a comment asking the maintainers to mark it as ready for review in order to actually trigger a CI run. This idea is found in GitHub's own repos: * https://github.com/github/codeql-action/pull/2263#issuecomment-2078311173 * https://github.com/github/codeql-action/blob/4ebadbc7/.github/workflows/update-dependencies.yml#L38-L41 * https://github.com/github/codeql-action/pull/1868 * https://github.com/github/codeql-action/pull/679
This commit is contained in:
parent
b08b6d122f
commit
323b0bd853
|
@ -14,6 +14,11 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- "[0-9]+.[0-9]+.x"
|
- "[0-9]+.[0-9]+.x"
|
||||||
|
types:
|
||||||
|
- opened # default
|
||||||
|
- synchronize # default
|
||||||
|
- reopened # default
|
||||||
|
- ready_for_review # used in PRs created from the release workflow
|
||||||
|
|
||||||
env:
|
env:
|
||||||
PYTEST_ADDOPTS: "--color=yes"
|
PYTEST_ADDOPTS: "--color=yes"
|
||||||
|
|
|
@ -46,6 +46,7 @@ jobs:
|
||||||
run: python scripts/update-plugin-list.py
|
run: python scripts/update-plugin-list.py
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
|
id: pr
|
||||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
|
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
|
||||||
with:
|
with:
|
||||||
commit-message: '[automated] Update plugin list'
|
commit-message: '[automated] Update plugin list'
|
||||||
|
@ -55,3 +56,13 @@ jobs:
|
||||||
branch-suffix: short-commit-hash
|
branch-suffix: short-commit-hash
|
||||||
title: '[automated] Update plugin list'
|
title: '[automated] Update plugin list'
|
||||||
body: '[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 }}'
|
||||||
|
|
Loading…
Reference in New Issue