Skip to content

Commit 4222ff0

Browse files
committed
WIP
1 parent f1efcbe commit 4222ff0

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)