mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
fix: Simplify PR pipeline trigger rules (#5727)
This change removes `labeled` and `unlabeled` as pipeline trigger actions, and instead adds `reopened` and `ready_for_review`. The logic whether to run the pipeline jobs is then simplified, although to get a draft PR with the `DraftCIRun` label to run it can be necessary to close and reopen a PR.
This commit is contained in:
24
.github/workflows/on-pr.yml
vendored
24
.github/workflows/on-pr.yml
vendored
@@ -31,9 +31,9 @@ on:
|
|||||||
- "conanfile.py"
|
- "conanfile.py"
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
- reopened
|
||||||
- synchronize
|
- synchronize
|
||||||
- labeled
|
- ready_for_review
|
||||||
- unlabeled
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -48,24 +48,10 @@ env:
|
|||||||
CONAN_REMOTE_URL: https://conan.ripplex.io
|
CONAN_REMOTE_URL: https://conan.ripplex.io
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# This job determines whether the workflow should run. It runs when:
|
# This job determines whether the workflow should run. It runs when the PR is
|
||||||
# * Opened as a non-draft PR.
|
# not a draft or has the 'DraftRunCI' label.
|
||||||
# * A commit is added to a non-draft PR or the PR has the 'DraftRunCI' label.
|
|
||||||
# * A draft PR has the 'DraftRunCI' label added.
|
|
||||||
# * A non-draft PR has the 'DraftRunCI' label removed.
|
|
||||||
# These checks are in part to ensure the workflow won't run needlessly while
|
|
||||||
# also allowing it to be triggered without having to add a no-op commit. A new
|
|
||||||
# workflow execution can be triggered by adding and then removing the label on
|
|
||||||
# a non-draft PR, or conversely by removing it and then adding it back on a
|
|
||||||
# draft PR; this can be useful in certain cases.
|
|
||||||
should-run:
|
should-run:
|
||||||
if: >-
|
if: ${{ !github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }}
|
||||||
${{
|
|
||||||
(github.event.action == 'opened' && !github.event.pull_request.draft) ||
|
|
||||||
(github.event.action == 'synchronize' && (!github.event.pull_request.draft || contains(github.event.pull_request.labels.*.name, 'DraftRunCI'))) ||
|
|
||||||
(github.event.action == 'labeled' && github.event.pull_request.draft && github.event.label.name == 'DraftRunCI') ||
|
|
||||||
(github.event.action == 'unlabeled' && !github.event.pull_request.draft && github.event.label.name == 'DraftRunCI')
|
|
||||||
}}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: No-op
|
- name: No-op
|
||||||
|
|||||||
Reference in New Issue
Block a user