Skip to content

Commit 9477965

Browse files
Add prerelease (#455)
* Add prerelease * Use string as input * Update notes * Fix typo * Update notes
1 parent a1b73c7 commit 9477965

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Reusable pre-release workflow
2+
# Reusable workflow to simplify pre-release testing
3+
# author: Christoph Froehlich <christoph.froehlich@ait.ac.at>
4+
#
5+
# Can be activated by
6+
# - workflow dispatch manual action
7+
# - adding labels: `check-prerelease` or `check-prerelease-downstream`. Once one of the label is added, it will be triggered by subsequent updates of the PR.
8+
#
9+
# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git).
10+
# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst)
11+
12+
on:
13+
workflow_call:
14+
inputs:
15+
ros_distro:
16+
description: 'ROS_DISTRO variable for industrial_ci'
17+
required: true
18+
type: string
19+
prerelease_downstream_depth:
20+
description: 'The depth of the depends-on tree to be included in the overlay workspace (-1 implies unlimited, default: 0)'
21+
required: false
22+
default: '0'
23+
type: string
24+
25+
jobs:
26+
default:
27+
if: |
28+
(github.event_name == 'workflow_dispatch') ||
29+
(github.event_name == 'pull_request' && contains(join(github.event.pull_request.labels.*.name, ','), 'check-prerelease'))
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v5
33+
- name: industrial_ci
34+
env:
35+
PRERELEASE: true
36+
# hardcode to 1 if label is check-prerelease-downstream, otherwise use input from workflow
37+
PRERELEASE_DOWNSTREAM_DEPTH: ${{ (github.event_name == 'pull_request' && contains(join(github.event.pull_request.labels.*.name, ','), 'check-prerelease-downstream')) && '1' || inputs.prerelease_downstream_depth}}
38+
BASEDIR: ${{ github.workspace }}/.work
39+
ROS_DISTRO: ${{ inputs.ROS_DISTRO }}
40+
DOCKER_IMAGE: ghcr.io/ros-controls/ros:${{ inputs.ROS_DISTRO }}-ubuntu-testing
41+
uses: ros-industrial/industrial_ci@master

0 commit comments

Comments
 (0)