-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
48 lines (43 loc) · 1.39 KB
/
action.yaml
File metadata and controls
48 lines (43 loc) · 1.39 KB
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
---
name: Generate Shards
description: This action builds list of shard indices for use in Github Actions Matrices
inputs:
product-name:
description: The name of the product to build via bake (directory name)
required: true
boil-version:
description: The boil version
default: latest
outputs:
versions:
description: A list of product versions
value: ${{ steps.generate_shards.outputs.VERSIONS }}
runs:
using: composite
steps:
- name: Setup boil (${{ inputs.boil-version }})
env:
BOIL_VERSION: ${{ inputs.boil-version }}
GITHUB_DEBUG: ${{ runner.debug }}
shell: bash
run: "$GITHUB_ACTION_PATH/../.scripts/actions/install_boil.sh"
- name: Generate Shards
id: generate_shards
env:
PRODUCT_NAME: ${{ inputs.product-name }}
GITHUB_DEBUG: ${{ runner.debug }}
shell: bash
run: |
set -euo pipefail
[ -n "$GITHUB_DEBUG" ] && set -x
VERSIONS=$(boil image list "$PRODUCT_NAME" | jq --compact-output --arg product_name "$PRODUCT_NAME" '.[$product_name]')
echo "VERSIONS=$VERSIONS" | tee -a "$GITHUB_OUTPUT"
- name: Print Shards
env:
GITHUB_DEBUG: ${{ runner.debug }}
VERSIONS: ${{ steps.generate_shards.outputs.VERSIONS }}
shell: bash
run: |
set -euo pipefail
[ -n "$GITHUB_DEBUG" ] && set -x
echo "versions=$VERSIONS"