Skip to content

Commit f0cc847

Browse files
authored
Allow run CI on external contributions (#1013)
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
1 parent 1868638 commit f0cc847

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/reusable-ubuntu-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ on:
5151
required: false
5252
type: boolean
5353
default: false
54+
add-label:
55+
description: 'Add the ci-pending label to the PR'
56+
required: false
57+
type: boolean
58+
default: false
5459
env:
5560
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' }}
5661
defaults:
@@ -68,7 +73,7 @@ jobs:
6873
- 'RelWithDebInfo'
6974
steps:
7075
- name: Add ci-pending label if PR
71-
if: ${{ github.event_name == 'pull_request' }}
76+
if: ${{ github.event_name == 'pull_request' && inputs.add-label == true}}
7277
uses: eProsima/eProsima-CI/external/add_labels@v0
7378
with:
7479
labels: ci-pending

.github/workflows/ubuntu-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,4 @@ jobs:
7272
run-build: ${{ !(github.event_name == 'pull_request') || !contains(github.event.pull_request.labels.*.name, 'skip-ci') }}
7373
run-tests: ${{ (inputs.run-tests == true) || ((github.event_name == 'pull_request') && (!contains(github.event.pull_request.labels.*.name, 'no-test'))) }}
7474
use-ccache: ${{ inputs.use-ccache || false }}
75+
add-label: ${{ (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.repository) && true || false }}

0 commit comments

Comments
 (0)