From 3df88c740b73ce33082e5ac53439bc8d07247cdc Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 12:15:46 +0100 Subject: [PATCH] Allow run CI on external contributions (#1013) (#1019) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mario Dominguez (cherry picked from commit f0cc847e3dfc24b8ee911914a815e0dda638625e) Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com> --- .github/workflows/reusable-ubuntu-ci.yml | 7 ++++++- .github/workflows/ubuntu-ci.yml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ubuntu-ci.yml b/.github/workflows/reusable-ubuntu-ci.yml index bb4011580..6e9399863 100644 --- a/.github/workflows/reusable-ubuntu-ci.yml +++ b/.github/workflows/reusable-ubuntu-ci.yml @@ -51,6 +51,11 @@ on: required: false type: boolean default: false + add-label: + description: 'Add the ci-pending label to the PR' + required: false + type: boolean + default: false env: build-meta: ${{ inputs.run-tests == true && './src/fastdds-docs/.github/workflows/config/build.meta ./src/fastdds-docs/.github/workflows/config/test.meta' || './src/fastdds-docs/.github/workflows/config/build.meta' }} defaults: @@ -68,7 +73,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 99f386608..b424b4397 100644 --- a/.github/workflows/ubuntu-ci.yml +++ b/.github/workflows/ubuntu-ci.yml @@ -72,3 +72,4 @@ jobs: run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }} run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }} use-ccache: ${{ inputs.use-ccache || false }} + add-label: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.repository) && true || false }}