Skip to content

Commit da9fc62

Browse files
committed
WIP
1 parent f1efcbe commit da9fc62

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
workflow_dispatch:
3+
4+
workflow_call:
5+
inputs:
6+
PROJECT:
7+
description: "The vanagon runtime project name, without trailing .rb"
8+
required: true
9+
type: string
10+
outputs:
11+
TARGETS:
12+
description: "The platforms for the given vanagon project"
13+
value: ${{ jobs.runtime_targets.outputs.targets }}
14+
15+
name: List runtime targets
16+
17+
jobs:
18+
runtime_targets:
19+
runs-on: ubuntu-latest
20+
name: Runtime targets
21+
steps:
22+
- name: Checkout current PR code
23+
uses: actions/checkout@v4
24+
with:
25+
repository: puppetlabs/ci-job-configs
26+
ref: main
27+
path: ci-job-configs
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Install ruby
31+
uses: ruby/setup-ruby@v1
32+
with:
33+
ruby-version: 3.3
34+
35+
- name: Get targets
36+
id: targets
37+
run: |
38+
set -x
39+
cd ci-job-configs
40+
name="${{ inputs.PROJECT }}"
41+
project="${name#-*}"
42+
branch="${name##*-}"
43+
targets=$(ruby resources/scripts/runtime-targets.rb $project $branch | cut -d'#' -f2)
44+
echo "TARGETS=$targets" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)