From 0764d5a6fcb56a96e5d6d2e5befdc80ee9f547c2 Mon Sep 17 00:00:00 2001 From: JesusPoderoso Date: Tue, 10 Sep 2024 15:45:17 +0200 Subject: [PATCH] Refs #21479: Include labeling check Signed-off-by: JesusPoderoso --- .github/workflows/nightly-ubuntu-ci.yml | 3 +++ .github/workflows/reusable-ubuntu-ci.yml | 7 ++++++- .github/workflows/ubuntu-ci.yml | 6 ++++++ .github/workflows/weekly-ubuntu-ci.yml | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly-ubuntu-ci.yml b/.github/workflows/nightly-ubuntu-ci.yml index e5ae53df315..493ca1e0c03 100644 --- a/.github/workflows/nightly-ubuntu-ci.yml +++ b/.github/workflows/nightly-ubuntu-ci.yml @@ -25,6 +25,7 @@ jobs: run-build: true run-tests: true use-ccache: false + add-label: false nightly-ubuntu-ci-2_14_x: strategy: @@ -45,6 +46,7 @@ jobs: run-build: true run-tests: true use-ccache: false + add-label: false nightly-ubuntu-ci-2_10_x: strategy: @@ -65,4 +67,5 @@ jobs: run-build: true run-tests: true use-ccache: false + add-label: false diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index 1c44e356965..a69ec039ea6 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -52,6 +52,11 @@ on: required: false type: boolean default: false + add-label: + description: 'Add the CI-PENDING label to the PR' + required: false + type: boolean + default: true env: security-cmake-flag: ${{ inputs.security == true && '-DSECURITY=ON' || '-DSECURITY=OFF' }} @@ -71,7 +76,7 @@ jobs: - 'RelWithDebInfo' steps: - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' && inputs.add-label == true }} uses: eProsima/eProsima-CI/external/add_labels@v0 with: labels: ci-pending diff --git a/.github/workflows/ubuntu-ci.yml b/.github/workflows/ubuntu-ci.yml index a2601850577..c93c1c87398 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -38,6 +38,11 @@ on: required: false type: boolean default: false + add-label: + description: 'Add a label to the PR' + required: false + type: boolean + default: false pull_request: types: @@ -69,3 +74,4 @@ jobs: run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} run-tests: ${{ ((inputs.run-tests == true) && true) || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'no-test')) }} use-ccache: ${{ ((inputs.use-ccache == true) && true) || false }} + add-label: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.repository) && true || false }} diff --git a/.github/workflows/weekly-ubuntu-ci.yml b/.github/workflows/weekly-ubuntu-ci.yml index c742836d246..afdb1bbd2ba 100644 --- a/.github/workflows/weekly-ubuntu-ci.yml +++ b/.github/workflows/weekly-ubuntu-ci.yml @@ -28,6 +28,7 @@ jobs: run-build: true run-tests: true use-ccache: false + add-label: false weekly-ubuntu-ci-2_6_x: strategy: @@ -46,3 +47,4 @@ jobs: run-build: true run-tests: true use-ccache: false + add-label: false