-
Notifications
You must be signed in to change notification settings - Fork 196
61 lines (56 loc) · 1.47 KB
/
ci-dispatch-group.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "CI/Dispatch/Group"
defaults:
run:
shell: bash -euo pipefail {0}
on:
workflow_call:
inputs:
name: {type: string, required: true}
jobs: {type: string, required: false, default: '[]'}
permissions:
contents: read
jobs:
standlone-jobs:
if: fromJson(inputs.jobs).standalone
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
include: ${{fromJson(inputs.jobs).standalone}}
runs-on: ubuntu-latest
steps:
- name: Debug
run: |
echo "Standalone Job"
echo "name: ${{ matrix.name }}"
echo "runner: ${{ matrix.runner }}"
echo "image: ${{ matrix.image }}"
echo "command: ${{ matrix.command }}"
# uses: ./.github/workflows/run-as-coder.yml
# with:
# name: ${{ matrix.name }}
# runner: ${{ matrix.runner }}
# image: ${{ matrix.image }}
# command: |
# ${{ matrix.command }}
two-stage-jobs:
if: fromJson(inputs.jobs).two_stage
permissions:
id-token: write
contents: read
strategy:
fail-fast: false
matrix:
include: ${{fromJson(inputs.jobs).two_stage}}
runs-on: ubuntu-latest
steps:
- name: Debug
run: |
echo "Two Stage Job"
echo "producers: ${{ matrix.producers }}"
echo "consumers: ${{ matrix.consumers }}"
# uses: ./.github/workflows/ci-dispatch-two-stage.yml
# with:
# jobs: ${{ matrix }}