Skip to content

Commit ab3c101

Browse files
committed
ci: update GitHub workflows to run only on non-draft PRs
Modify GitHub workflows to trigger only when pull requests are not in draft state and specify explicit PR event types (opened, synchronize, reopened, ready_for_review). Additionally, update the runner environment to ubuntu-24.04 for consistency and improved compatibility.
1 parent e63bcd7 commit ab3c101

7 files changed

+14
-7
lines changed

.github/actions/comment-test-coverage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name: test-pull-request
1313
on: [pull_request]
1414
jobs:
1515
build:
16-
runs-on: ubuntu-latest
16+
runs-on: ubuntu-24.04
1717
steps:
1818
- name: Checkout Code
1919
uses: actions/checkout@v4

.github/workflows/5_builderpackage_plugins.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
test-packages:
4747
needs: build
4848
name: Test packages
49-
runs-on: ubuntu-latest
49+
runs-on: ubuntu-24.04
5050
strategy:
5151
matrix:
5252
plugin: [wazuh-core, wazuh-check-updates]

.github/workflows/5_builderprecompiled_base-dev-environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
# using a pre-built Docker image, hosted in Quay.io.
5353
deploy_and_run_command:
5454
name: Deploy and run command
55-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-24.04
5656
strategy:
5757
matrix:
5858
plugins:

.github/workflows/5_codeanalysis_dependency-review.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
# - 🚨 Automatically blocks insecure dependency additions when configured.
1919

2020
name: 'Dependency Review'
21-
on: [pull_request]
21+
on:
22+
pull_request:
23+
types: [opened, synchronize, reopened, ready_for_review]
2224

2325
concurrency:
2426
group: pr-${{ github.event.pull_request.number || github.ref }}
@@ -29,7 +31,8 @@ permissions:
2931

3032
jobs:
3133
dependency-review:
32-
runs-on: ubuntu-latest
34+
runs-on: ubuntu-24.04
35+
if: github.event.pull_request.draft == false
3336
steps:
3437
- name: 'Checkout Repository'
3538
uses: actions/checkout@v4

.github/workflows/5_codequality_lint-and-format.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ name: Code Quality Assurance
2222

2323
on:
2424
pull_request:
25+
types: [opened, synchronize, reopened, ready_for_review]
2526
branches-ignore:
2627
- 2.*
2728
- 3.*
@@ -34,7 +35,8 @@ concurrency:
3435
jobs:
3536
lint_and_format:
3637
name: Ensure code quality and format on the changed files
37-
runs-on: ubuntu-latest
38+
runs-on: ubuntu-24.04
39+
if: github.event.pull_request.draft == false
3840
strategy:
3941
matrix:
4042
tool:

.github/workflows/5_testunit_jest.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ on:
3131
options:
3232
- 'yarn test:jest'
3333
pull_request:
34+
types: [opened, synchronize, reopened, ready_for_review]
3435

3536
concurrency:
3637
group: pr-${{ github.event.pull_request.number || github.ref }}
@@ -39,6 +40,7 @@ concurrency:
3940
jobs:
4041
# Run unit tests with Jest
4142
test:
43+
if: github.event.pull_request.draft == false
4244
name: Run unit tests
4345
uses: ./.github/workflows/5_builderprecompiled_base-dev-environment.yml
4446
with:

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
backport:
1010
name: Backport
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
# Only react to merged PRs for security reasons.
1313
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
1414
if: >

0 commit comments

Comments
 (0)