Skip to content

Commit 666dec3

Browse files
Allow to run CI on external contributions (#254) (#255)
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com> (cherry picked from commit abf6c9a) Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
1 parent 8af1561 commit 666dec3

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/reusable-ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ on:
4747
required: false
4848
type: boolean
4949
default: false
50+
add-label:
51+
description: 'Add the ci-pending label to the PR'
52+
required: false
53+
type: boolean
54+
default: false
5055
env:
5156
toolset: ${{ inputs.vs-toolset && format('-T {0}', inputs.vs-toolset) || '' }}
5257
defaults:
@@ -65,7 +70,7 @@ jobs:
6570

6671
steps:
6772
- name: Add ci-pending label if PR
68-
if: ${{ github.event_name == 'pull_request' }}
73+
if: ${{ github.event_name == 'pull_request' && inputs.add-label == true}}
6974
uses: eProsima/eProsima-CI/external/add_labels@v0
7075
with:
7176
labels: ci-pending

.github/workflows/ubuntu-ci.yml

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

0 commit comments

Comments
 (0)