-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
44 lines (41 loc) · 1.26 KB
/
action.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
---
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
config-file:
description: Path the the config file used to generate the shard indices
default: ./conf.py
outputs:
versions:
description: A list of product versions
value: ${{ steps.generate_shards.outputs.VERSIONS }}
runs:
using: composite
steps:
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.12'
- name: Extract Action Path
shell: bash
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}
run: |
set -euo pipefail
echo "GITHUB_ACTION_PATH=$GITHUB_ACTION_PATH" | tee -a "$GITHUB_ENV"
- name: Generate Shards
id: generate_shards
shell: bash
env:
PRODUCT_NAME: ${{ inputs.product-name }}
CONFIG_FILE: ${{ inputs.config-file }}
run: |
set -euo pipefail
python "$GITHUB_ACTION_PATH/../.scripts/shard.py"
- name: Print Shards
shell: bash
run: |
set -euo pipefail
echo versions=${{ steps.generate_shards.outputs.VERSIONS }}