ci: update conditions at which CI runs (#2761)
* ci(conventional-labels.yml): update pull_request_target event types to remove unnecessary spaces and adjust pull_request_review event types to only trigger on submitted actions * feat: add condition to run path-filter job only if PR is approved, manual run, or not a draft PR
This commit is contained in:
parent
50a64b0e0e
commit
c15e8ace8a
2 changed files with 9 additions and 5 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
|
@ -16,7 +16,8 @@ on:
|
||||||
description: "Store API Key"
|
description: "Store API Key"
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
pull_request:
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
|
@ -24,6 +25,8 @@ concurrency:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
path-filter:
|
path-filter:
|
||||||
|
# should run if the PR is approved,or if it's a manual run or if it is not a draft PR
|
||||||
|
if: ${{github.event.review.state == 'APPROVED' || github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false}}
|
||||||
name: Filter Paths
|
name: Filter Paths
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
|
|
@ -74,8 +77,7 @@ jobs:
|
||||||
ci_success:
|
ci_success:
|
||||||
name: "CI Success"
|
name: "CI Success"
|
||||||
needs: [test-backend, test-frontend, lint-backend, test-docs-build]
|
needs: [test-backend, test-frontend, lint-backend, test-docs-build]
|
||||||
if: |
|
if: always()
|
||||||
always()
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
JOBS_JSON: ${{ toJSON(needs) }}
|
JOBS_JSON: ${{ toJSON(needs) }}
|
||||||
|
|
@ -87,4 +89,4 @@ jobs:
|
||||||
echo $JOBS_JSON
|
echo $JOBS_JSON
|
||||||
echo $RESULTS_JSON
|
echo $RESULTS_JSON
|
||||||
echo "Exiting with $EXIT_CODE"
|
echo "Exiting with $EXIT_CODE"
|
||||||
exit $EXIT_CODE
|
exit $EXIT_CODE
|
||||||
4
.github/workflows/conventional-labels.yml
vendored
4
.github/workflows/conventional-labels.yml
vendored
|
|
@ -3,7 +3,9 @@
|
||||||
name: Label PRs with Conventional Commits
|
name: Label PRs with Conventional Commits
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [ opened, edited , reopened, auto_merge_enabled]
|
types: [opened, edited]
|
||||||
|
pull_request_review:
|
||||||
|
types: [submitted]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-pr:
|
validate-pr:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue