Skip to content

Commit ccddbf5

Browse files
JesusPoderosomergify[bot]
authored andcommitted
Allow runing CI on external contributions (#5220)
* Refs #21479: Include labeling check Signed-off-by: JesusPoderoso <[email protected]> * Refs #21479: Keep 'Add label' job only in ubuntu workflow Signed-off-by: JesusPoderoso <[email protected]> * Refs #21479: Apply rev suggestions Signed-off-by: eProsima <[email protected]> --------- Signed-off-by: JesusPoderoso <[email protected]> Signed-off-by: eProsima <[email protected]> (cherry picked from commit 2d1e793)
1 parent 93fc3cb commit ccddbf5

File tree

5 files changed

+7
-33
lines changed

5 files changed

+7
-33
lines changed

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

-8
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ jobs:
4848
cmake-build-type:
4949
- 'RelWithDebInfo'
5050
steps:
51-
- name: Add ci-pending label if PR
52-
if: ${{ github.event_name == 'pull_request' }}
53-
uses: eProsima/eProsima-CI/external/add_labels@v0
54-
with:
55-
labels: ci-pending
56-
number: ${{ github.event.number }}
57-
repo: eProsima/Fast-DDS
58-
5951
- name: Sync eProsima/Fast-DDS repository
6052
uses: eProsima/eProsima-CI/external/checkout@v0
6153
with:

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

-16
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@ jobs:
5555
if: ${{ inputs.run_asan_fastdds == true }}
5656
runs-on: ubuntu-22.04
5757
steps:
58-
- name: Add ci-pending label if PR
59-
if: ${{ github.event_name == 'pull_request' }}
60-
uses: eProsima/eProsima-CI/external/add_labels@v0
61-
with:
62-
labels: ci-pending
63-
number: ${{ github.event.number }}
64-
repo: eProsima/Fast-DDS
65-
6658
- name: Sync eProsima/Fast-DDS repository
6759
uses: eProsima/eProsima-CI/external/checkout@v0
6860
with:
@@ -342,14 +334,6 @@ jobs:
342334
CC: gcc-12
343335
CXX: g++-12
344336
steps:
345-
- name: Add ci-pending label if PR
346-
if: ${{ github.event_name == 'pull_request' }}
347-
uses: eProsima/eProsima-CI/external/add_labels@v0
348-
with:
349-
labels: ci-pending
350-
number: ${{ github.event.number }}
351-
repo: eProsima/Fast-DDS
352-
353337
- name: Sync eProsima/Fast-DDS repository
354338
uses: eProsima/eProsima-CI/external/checkout@v0
355339
with:

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ on:
5252
required: false
5353
type: boolean
5454
default: false
55+
add-label:
56+
description: 'Add the CI-PENDING label to the PR'
57+
required: false
58+
type: boolean
59+
default: false
5560

5661
env:
5762
security-cmake-flag: ${{ inputs.security == true && '-DSECURITY=ON' || '-DSECURITY=OFF' }}
@@ -71,7 +76,7 @@ jobs:
7176
- 'RelWithDebInfo'
7277
steps:
7378
- name: Add ci-pending label if PR
74-
if: ${{ github.event_name == 'pull_request' }}
79+
if: ${{ github.event_name == 'pull_request' && inputs.add-label == true }}
7580
uses: eProsima/eProsima-CI/external/add_labels@v0
7681
with:
7782
labels: ci-pending

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

-8
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ jobs:
3939
vs-toolset:
4040
- 'v142'
4141
steps:
42-
- name: Add ci-pending label if PR
43-
if: ${{ github.event_name == 'pull_request' }}
44-
uses: eProsima/eProsima-CI/external/add_labels@v0
45-
with:
46-
labels: ci-pending
47-
number: ${{ github.event.number }}
48-
repo: eProsima/Fast-DDS
49-
5042
- name: Sync eProsima/Fast-DDS repository
5143
uses: eProsima/eProsima-CI/external/checkout@v0
5244
with:

.github/workflows/ubuntu-ci.yml

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

0 commit comments

Comments
 (0)